From 3b6278170705e84b9158ccfd3099386cc3fb7561 Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Sat, 7 Oct 2023 09:29:19 -0400 Subject: [PATCH 001/187] ui refresh for rollouts list view --- docs/CONTRIBUTING.md | 16 ++ ui/package.json | 1 + ui/src/app/App.tsx | 4 +- .../confirm-button/confirm-button.tsx | 8 +- ui/src/app/components/info-item/info-item.tsx | 2 +- ui/src/app/components/pods/pods.tsx | 5 +- .../rollout-actions/rollout-actions.tsx | 169 ++++++------ .../rollout-widget/rollout-widget.scss | 181 ++++++++++++ .../rollout-widget/rollout-widget.tsx | 107 ++++++++ ui/src/app/components/rollout/containers.tsx | 3 +- ui/src/app/components/rollout/rollout.tsx | 7 +- .../rollouts-grid/rollouts-grid.scss | 8 + .../rollouts-grid/rollouts-grid.tsx | 19 ++ .../rollouts-home.scss} | 6 + .../rollouts-home/rollouts-home.tsx | 128 +++++++++ .../rollouts-list/rollouts-list.tsx | 258 ------------------ .../rollouts-table/rollouts-table.scss | 14 + .../rollouts-table/rollouts-table.tsx | 223 +++++++++++++++ .../rollouts-toolbar/rollouts-toolbar.scss | 43 +++ .../rollouts-toolbar/rollouts-toolbar.tsx | 198 ++++++++++++++ .../components/status-count/status-count.scss | 31 +++ .../components/status-count/status-count.tsx | 16 ++ .../components/status-icon/status-icon.tsx | 34 ++- ui/src/app/index.tsx | 2 +- ui/src/models/rollout/analysisrun.tsx | 4 + 25 files changed, 1124 insertions(+), 363 deletions(-) create mode 100644 ui/src/app/components/rollout-widget/rollout-widget.scss create mode 100644 ui/src/app/components/rollout-widget/rollout-widget.tsx create mode 100644 ui/src/app/components/rollouts-grid/rollouts-grid.scss create mode 100644 ui/src/app/components/rollouts-grid/rollouts-grid.tsx rename ui/src/app/components/{rollouts-list/rollouts-list.scss => rollouts-home/rollouts-home.scss} (97%) create mode 100644 ui/src/app/components/rollouts-home/rollouts-home.tsx delete mode 100644 ui/src/app/components/rollouts-list/rollouts-list.tsx create mode 100644 ui/src/app/components/rollouts-table/rollouts-table.scss create mode 100644 ui/src/app/components/rollouts-table/rollouts-table.tsx create mode 100644 ui/src/app/components/rollouts-toolbar/rollouts-toolbar.scss create mode 100644 ui/src/app/components/rollouts-toolbar/rollouts-toolbar.tsx create mode 100644 ui/src/app/components/status-count/status-count.scss create mode 100644 ui/src/app/components/status-count/status-count.tsx create mode 100644 ui/src/models/rollout/analysisrun.tsx diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index a37ad29fc0..d1ce358e63 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -110,6 +110,22 @@ To run a subset of e2e tests, you need to specify the suite with `-run`, and the E2E_TEST_OPTIONS="-run 'TestCanarySuite' -testify.m 'TestCanaryScaleDownOnAbortNoTrafficRouting'" make test-e2e ``` +## Running the UI + +If you'd like to run the UI locally, you first need a running Rollouts controller. This can be a locally running controller with a k3d cluster, as described above, or a controller running in a remote Kubernetes cluster. + +In order for the local React app to communicate with the controller and Kubernetes API, run the following to open a port forward to the dashboard: +```bash +kubectl argo rollouts dashboard +``` + +In another terminal, run the following to start the UI: +```bash +cd ui +yarn install +yarn start +``` + ## Controller architecture Argo Rollouts is actually a collection of individual controllers diff --git a/ui/package.json b/ui/package.json index fac0a758f3..46c0e34666 100644 --- a/ui/package.json +++ b/ui/package.json @@ -4,6 +4,7 @@ "private": true, "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.4.0", + "@fortawesome/free-regular-svg-icons": "^6.4.0", "@fortawesome/free-solid-svg-icons": "^6.4.0", "@fortawesome/react-fontawesome": "^0.2.0", "antd": "^5.4.2", diff --git a/ui/src/app/App.tsx b/ui/src/app/App.tsx index 60ba5419c6..ae0bd2b54e 100644 --- a/ui/src/app/App.tsx +++ b/ui/src/app/App.tsx @@ -7,7 +7,7 @@ import './App.scss'; import {NamespaceContext, RolloutAPI} from './shared/context/api'; import {Modal} from './components/modal/modal'; import {Rollout} from './components/rollout/rollout'; -import {RolloutsList} from './components/rollouts-list/rollouts-list'; +import {RolloutsHome} from './components/rollouts-home/rollouts-home'; import {Shortcut, Shortcuts} from './components/shortcuts/shortcuts'; import {ConfigProvider} from 'antd'; import {theme} from '../config/theme'; @@ -84,7 +84,7 @@ const App = () => { } + component={} shortcuts={[ {key: '/', description: 'Search'}, {key: 'TAB', description: 'Search, navigate search items'}, diff --git a/ui/src/app/components/confirm-button/confirm-button.tsx b/ui/src/app/components/confirm-button/confirm-button.tsx index 4dd4f37e7c..48ce3fba77 100644 --- a/ui/src/app/components/confirm-button/confirm-button.tsx +++ b/ui/src/app/components/confirm-button/confirm-button.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import {Button, Popconfirm, Tooltip} from 'antd'; import {ButtonProps} from 'antd/es/button/button'; import {useState} from 'react'; -import { TooltipPlacement } from 'antd/es/tooltip'; +import {TooltipPlacement} from 'antd/es/tooltip'; interface ConfirmButtonProps extends ButtonProps { skipconfirm?: boolean; @@ -51,7 +51,8 @@ export const ConfirmButton = (props: ConfirmButtonProps) => { onClick={(e) => { e.stopPropagation(); e.preventDefault(); - }}> + }} + > { okText='Yes' cancelText='No' onOpenChange={handleOpenChange} - placement={props.placement || 'bottom'}> + placement={props.placement || 'bottom'} + >
diff --git a/ui/src/app/components/info-item/info-item.tsx b/ui/src/app/components/info-item/info-item.tsx index 7e7bf8e617..ab64712885 100644 --- a/ui/src/app/components/info-item/info-item.tsx +++ b/ui/src/app/components/info-item/info-item.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import './info-item.scss'; -import { Tooltip } from 'antd'; +import {Tooltip} from 'antd'; export enum InfoItemKind { Default = 'default', diff --git a/ui/src/app/components/pods/pods.tsx b/ui/src/app/components/pods/pods.tsx index c3e5fecb32..1107a8444d 100644 --- a/ui/src/app/components/pods/pods.tsx +++ b/ui/src/app/components/pods/pods.tsx @@ -55,7 +55,7 @@ export const ReplicaSets = (props: {replicaSets: RolloutReplicaSetInfo[]; showRe
- ) + ), )}
); @@ -84,7 +84,8 @@ export const ReplicaSet = (props: {rs: RolloutReplicaSetInfo; showRevision?: boo Scaledown in - }> + } + > ) as any} icon='fa fa-clock'> ); diff --git a/ui/src/app/components/rollout-actions/rollout-actions.tsx b/ui/src/app/components/rollout-actions/rollout-actions.tsx index 94a4b289f2..2eaad61502 100644 --- a/ui/src/app/components/rollout-actions/rollout-actions.tsx +++ b/ui/src/app/components/rollout-actions/rollout-actions.tsx @@ -25,93 +25,98 @@ interface ActionData { shouldConfirm?: boolean; } -export const RolloutActionButton = (props: {action: RolloutAction; rollout: RolloutInfo; callback?: Function; indicateLoading: boolean; disabled?: boolean}) => { - const api = React.useContext(RolloutAPIContext); - const namespaceCtx = React.useContext(NamespaceContext); +// export const RolloutActionButton = (props: {action: RolloutAction; rollout: RolloutInfo; callback?: Function; indicateLoading: boolean; disabled?: boolean}) => { +export const RolloutActionButton = React.memo( + ({action, rollout, callback, indicateLoading, disabled}: {action: RolloutAction; rollout: RolloutInfo; callback?: Function; indicateLoading: boolean; disabled?: boolean}) => { + const [loading, setLoading] = React.useState(false); + const api = React.useContext(RolloutAPIContext); + const namespaceCtx = React.useContext(NamespaceContext); - const restartedAt = formatTimestamp(props.rollout.restartedAt || ''); - const isDeploying = props.rollout.status === RolloutStatus.Progressing || props.rollout.status === RolloutStatus.Paused; + const restartedAt = formatTimestamp(rollout.restartedAt || ''); + const isDeploying = rollout.status === RolloutStatus.Progressing || rollout.status === RolloutStatus.Paused; - const actionMap = new Map([ - [ - RolloutAction.Restart, - { - label: 'RESTART', - icon: faSync, - action: api.rolloutServiceRestartRollout, - tooltip: restartedAt === 'Never' ? 'Never restarted' : `Last restarted ${restartedAt}`, - shouldConfirm: true, - }, - ], - [ - RolloutAction.Retry, - { - label: 'RETRY', - icon: faRedoAlt, - action: api.rolloutServiceRetryRollout, - disabled: props.rollout.status !== RolloutStatus.Degraded, - shouldConfirm: true, - }, - ], - [ - RolloutAction.Abort, - { - label: 'ABORT', - icon: faExclamationCircle, - action: api.rolloutServiceAbortRollout, - disabled: !isDeploying, - shouldConfirm: true, - }, - ], - [ - RolloutAction.Promote, - { - label: 'PROMOTE', - icon: faChevronCircleUp, - action: api.rolloutServicePromoteRollout, - body: {full: false}, - disabled: !isDeploying, - shouldConfirm: true, - }, - ], - [ - RolloutAction.PromoteFull, - { - label: 'PROMOTE-FULL', - icon: faArrowCircleUp, - action: api.rolloutServicePromoteRollout, - body: {full: true}, - disabled: !isDeploying, - shouldConfirm: true, - }, - ], - ]); + const actionMap = new Map([ + [ + RolloutAction.Restart, + { + label: 'RESTART', + icon: faSync, + action: api.rolloutServiceRestartRollout, + tooltip: restartedAt === 'Never' ? 'Never restarted' : `Last restarted ${restartedAt}`, + shouldConfirm: true, + }, + ], + [ + RolloutAction.Retry, + { + label: 'RETRY', + icon: faRedoAlt, + action: api.rolloutServiceRetryRollout, + disabled: rollout.status !== RolloutStatus.Degraded, + shouldConfirm: true, + }, + ], + [ + RolloutAction.Abort, + { + label: 'ABORT', + icon: faExclamationCircle, + action: api.rolloutServiceAbortRollout, + disabled: !isDeploying, + shouldConfirm: true, + }, + ], + [ + RolloutAction.Promote, + { + label: 'PROMOTE', + icon: faChevronCircleUp, + action: api.rolloutServicePromoteRollout, + body: {full: false}, + disabled: !isDeploying, + shouldConfirm: true, + }, + ], + [ + RolloutAction.PromoteFull, + { + label: 'PROMOTE-FULL', + icon: faArrowCircleUp, + action: api.rolloutServicePromoteRollout, + body: {full: true}, + disabled: !isDeploying, + shouldConfirm: true, + }, + ], + ]); - const ap = actionMap.get(props.action); + const ap = actionMap.get(action); - const [loading, setLoading] = React.useState(false); + // const [loading, setLoading] = React.useState(false); - return ( - { - setLoading(true); - await ap.action(ap.body || {}, namespaceCtx.namespace, props.rollout.objectMeta?.name || ''); - if (props.callback) { - await props.callback(); - } - setLoading(false); - }} - disabled={ap.disabled} - loading={loading} - tooltip={ap.tooltip} - icon={}> - {props.action} - - ); -}; + return ( + { + setLoading(true); + await ap.action(ap.body || {}, namespaceCtx.namespace, rollout.objectMeta?.name || ''); + if (callback) { + await callback(); + } + setLoading(false); + }} + disabled={ap.disabled} + loading={loading} + tooltip={ap.tooltip} + icon={} + > + {action} + + ); + }, +); export const RolloutActions = (props: {rollout: RolloutInfo}) => (
diff --git a/ui/src/app/components/rollout-widget/rollout-widget.scss b/ui/src/app/components/rollout-widget/rollout-widget.scss new file mode 100644 index 0000000000..44172b00af --- /dev/null +++ b/ui/src/app/components/rollout-widget/rollout-widget.scss @@ -0,0 +1,181 @@ +@import 'node_modules/argo-ui/v2/styles/colors'; + +$WIDGET_WIDTH: 400px; + +$widgetPadding: 17px; +$widgetMarginRight: 20px; +$colWidth: ($WIDGET_WIDTH + (2 * $widgetPadding)) + $widgetMarginRight; + +.rollouts-list { + display: flex; + box-sizing: border-box; + flex-wrap: wrap; + + &__search-container { + width: 50% !important; + margin: 0 auto; + } + + &__search { + width: 100%; + font-size: 15px; + } + + &__rollouts-container { + padding: 20px; + display: flex; + flex-wrap: wrap; + + width: 3 * $colWidth; + margin: 0 auto; + + @media screen and (max-width: (3 * $colWidth)) { + width: 2 * $colWidth; + margin: 0 auto; + } + + @media screen and (max-width: (2 * $colWidth)) { + width: $colWidth; + + .rollouts-list__widget { + margin: 0 inherit; + width: 100%; + } + + .rollouts-list__search-container { + width: 100% !important; + } + } + } + + &__empty-message { + padding-top: 70px; + width: 50%; + margin: 0 auto; + color: $argo-color-gray-7; + h1 { + margin-bottom: 1em; + text-align: center; + } + div { + line-height: 1.5em; + } + pre { + overflow: scroll; + cursor: pointer; + line-height: 2em; + font-size: 15px; + padding: 3px 5px; + color: $argo-color-gray-8; + margin: 0.5em 0; + background-color: white; + } + a { + color: $sea; + border-bottom: 1px solid $sea; + } + + &--dark { + color: $shine; + a { + color: $sky; + border-color: $sky; + } + pre { + background-color: $space; + color: $shine; + } + } + + @media screen and (max-width: (2 * $colWidth)) { + width: 80%; + } + } + + &__toolbar { + width: 100%; + padding: 1em 0; + background-color: white; + border-bottom: 1px solid white; + + &--dark { + border-bottom: 1px solid $silver-lining; + background-color: $space; + } + } + + &__widget { + position: relative; + box-sizing: border-box; + padding: 17px; + font-size: 14px; + margin: 0 10px; + color: $argo-color-gray-7; + width: $WIDGET_WIDTH; + height: max-content; + flex-shrink: 0; + margin-bottom: 1.5em; + border-radius: 5px; + background-color: white; + box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.05); + border: 1px solid $argo-color-gray-4; + z-index: 0; + + &:hover, + &--selected { + border-color: $argo-running-color; + } + + &__pods { + margin-bottom: 1em; + } + + &--dark { + color: $dull-shine; + border-color: $silver-lining; + box-shadow: 1px 2px 3px 1px $space; + background: none; + } + + &__refresh { + &:hover { + color: $argo-running-color; + } + } + + &__body { + margin-bottom: 1em; + padding-bottom: 0.75em; + border-bottom: 1px solid $argo-color-gray-4; + &--dark { + border-bottom: 1px solid $silver-lining; + } + } + + header { + color: $argo-color-gray-8; + display: flex; + align-items: center; + font-weight: 600; + font-size: 20px; + margin-bottom: 1em; + } + + &--dark header { + color: $shine; + border-bottom: 1px solid $silver-lining; + } + &__actions { + position: relative; + display: flex; + align-items: center; + margin-top: 1.5em; + z-index: 10 !important; + } + &__actions { + color: $argo-color-gray-7; + font-size: 14px; + margin-top: 0.5em; + } + } +} \ No newline at end of file diff --git a/ui/src/app/components/rollout-widget/rollout-widget.tsx b/ui/src/app/components/rollout-widget/rollout-widget.tsx new file mode 100644 index 0000000000..319589fdbd --- /dev/null +++ b/ui/src/app/components/rollout-widget/rollout-widget.tsx @@ -0,0 +1,107 @@ +import * as React from 'react'; +import {Link} from 'react-router-dom'; + +import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; +import {faCircleNotch, faRedoAlt} from '@fortawesome/free-solid-svg-icons'; +import {Tooltip} from 'antd'; + +import {ParsePodStatus, PodStatus, ReplicaSets} from '../pods/pods'; +import {RolloutInfo} from '../../../models/rollout/rollout'; +import {useWatchRollout} from '../../shared/services/rollout'; +import {useClickOutside} from '../../shared/utils/utils'; +import {InfoItemKind, InfoItemRow} from '../info-item/info-item'; +import {RolloutAction, RolloutActionButton} from '../rollout-actions/rollout-actions'; +import {RolloutStatus, StatusIcon} from '../status-icon/status-icon'; +import './rollout-widget.scss'; + +export const isInProgress = (rollout: RolloutInfo): boolean => { + for (const rs of rollout.replicaSets || []) { + for (const p of rs.pods || []) { + const status = ParsePodStatus(p.status); + if (status === PodStatus.Pending) { + return true; + } + } + } + return false; +}; + +export const RolloutWidget = (props: {rollout: RolloutInfo; deselect: () => void; selected?: boolean}) => { + const [watching, subscribe] = React.useState(false); + let rollout = props.rollout; + useWatchRollout(props.rollout?.objectMeta?.name, watching, null, (r: RolloutInfo) => (rollout = r)); + const ref = React.useRef(null); + useClickOutside(ref, props.deselect); + + React.useEffect(() => { + if (watching) { + const to = setTimeout(() => { + if (!isInProgress(rollout)) { + subscribe(false); + } + }, 5000); + return () => clearTimeout(to); + } + }, [watching, rollout]); + + return ( + + { + subscribe(true); + setTimeout(() => { + subscribe(false); + }, 1000); + }} + /> +
+ + {(rollout.strategy || '').toLocaleLowerCase() === 'canary' && } +
+ {/* {(rollout.replicaSets || []).length < 1 && } */} + +
{rollout.message !== 'CanaryPauseStep' && rollout.message}
+
+ subscribe(true)} indicateLoading /> + subscribe(true)} indicateLoading /> +
+ + ); +}; + +const WidgetHeader = (props: {rollout: RolloutInfo; refresh: () => void}) => { + const {rollout} = props; + const [loading, setLoading] = React.useState(false); + React.useEffect(() => { + setTimeout(() => setLoading(false), 500); + }, [loading]); + return ( +
+ {rollout.objectMeta?.name} + + + { + props.refresh(); + setLoading(true); + e.preventDefault(); + }} + /> + + + +
+ ); +}; diff --git a/ui/src/app/components/rollout/containers.tsx b/ui/src/app/components/rollout/containers.tsx index c69b30658b..552ac29a93 100644 --- a/ui/src/app/components/rollout/containers.tsx +++ b/ui/src/app/components/rollout/containers.tsx @@ -63,7 +63,8 @@ export const ContainersWidget = (props: ContainersWidgetProps) => { setError(true); } } - }}> + }} + > {error ? 'ERROR' : 'SAVE'}
diff --git a/ui/src/app/components/rollout/rollout.tsx b/ui/src/app/components/rollout/rollout.tsx index 91b6c0a9d8..317d223d2d 100644 --- a/ui/src/app/components/rollout/rollout.tsx +++ b/ui/src/app/components/rollout/rollout.tsx @@ -332,7 +332,8 @@ const Step = (props: {step: GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1 (props.step.setMirrorRoute && openMirror) ? 'steps__step-title--experiment' : '' - }`}> + }`} + > {icon && } {content} {unit} {props.step.setCanaryScale && ( @@ -457,7 +458,7 @@ const WidgetItemSetMirror = ({value}: {value: GithubComArgoprojArgoRolloutsPkgAp {index} - Path ({stringMatcherType})
{stringMatcherValue}
- + , ); } if (val.method != null) { @@ -479,7 +480,7 @@ const WidgetItemSetMirror = ({value}: {value: GithubComArgoprojArgoRolloutsPkgAp {index} - Method ({stringMatcherType})
{stringMatcherValue}
- + , ); } return fragments; diff --git a/ui/src/app/components/rollouts-grid/rollouts-grid.scss b/ui/src/app/components/rollouts-grid/rollouts-grid.scss new file mode 100644 index 0000000000..4f6e1dc22f --- /dev/null +++ b/ui/src/app/components/rollouts-grid/rollouts-grid.scss @@ -0,0 +1,8 @@ +@import 'node_modules/argo-ui/v2/styles/colors'; + +.rollouts-grid { + display: flex; + box-sizing: border-box; + flex-wrap: wrap; + padding-top: 20px; +} diff --git a/ui/src/app/components/rollouts-grid/rollouts-grid.tsx b/ui/src/app/components/rollouts-grid/rollouts-grid.tsx new file mode 100644 index 0000000000..1692d637b6 --- /dev/null +++ b/ui/src/app/components/rollouts-grid/rollouts-grid.tsx @@ -0,0 +1,19 @@ +import * as React from 'react'; + +import './rollouts-grid.scss'; +import {RolloutInfo} from '../../../models/rollout/rollout'; +import {RolloutWidget} from '../rollout-widget/rollout-widget'; + +export const RolloutsGrid = ({rollouts}: {rollouts: RolloutInfo[]}) => { + // ({ rollouts, onFavoriteChange, favorites }: { rollouts: RolloutInfo[], onFavoriteChange: (rollout: RolloutInfo) => void, favorites: { [key: string]: boolean } }) => { + // const handleFavoriteChange = (rollout: RolloutInfo) => { + // onFavoriteChange(rollout); + // }; + return ( +
+ {rollouts.map((rollout, i) => ( + {}} /> + ))} +
+ ); +}; diff --git a/ui/src/app/components/rollouts-list/rollouts-list.scss b/ui/src/app/components/rollouts-home/rollouts-home.scss similarity index 97% rename from ui/src/app/components/rollouts-list/rollouts-list.scss rename to ui/src/app/components/rollouts-home/rollouts-home.scss index f0ec5fdcc7..575c8350f6 100644 --- a/ui/src/app/components/rollouts-list/rollouts-list.scss +++ b/ui/src/app/components/rollouts-home/rollouts-home.scss @@ -6,6 +6,12 @@ $widgetPadding: 17px; $widgetMarginRight: 20px; $colWidth: ($WIDGET_WIDTH + (2 * $widgetPadding)) + $widgetMarginRight; +.rollouts-home { + height: 100vh; + display: flex; + flex-direction: column; +} + .rollouts-list { display: flex; box-sizing: border-box; diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx new file mode 100644 index 0000000000..34548c9bd4 --- /dev/null +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -0,0 +1,128 @@ +import * as React from 'react'; + +import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; +import {faCircleNotch} from '@fortawesome/free-solid-svg-icons'; + +import {NamespaceContext} from '../../shared/context/api'; +import {useWatchRollouts} from '../../shared/services/rollout'; +import {RolloutsToolbar, defaultDisplayMode} from '../rollouts-toolbar/rollouts-toolbar'; +import {RolloutsTable} from '../rollouts-table/rollouts-table'; +import {RolloutsGrid} from '../rollouts-grid/rollouts-grid'; +import {Filters} from '../rollouts-toolbar/rollouts-toolbar'; +import './rollouts-home.scss'; + +export const RolloutsHome = () => { + const rolloutsList = useWatchRollouts(); + const rollouts = rolloutsList.items; + const loading = rolloutsList.loading; + const namespaceCtx = React.useContext(NamespaceContext); + + const [filters, setFilters] = React.useState({ + showRequiresAttention: false, + showFavorites: false, + name: '', + displayMode: defaultDisplayMode, + status: { + progressing: false, + degraded: false, + paused: false, + healthy: false, + }, + }); + + const handleFilterChange = (newFilters: Filters) => { + setFilters(newFilters); + }; + + const [favorites, setFavorites] = React.useState(() => { + const favoritesStr = localStorage.getItem('rolloutsFavorites'); + return favoritesStr ? JSON.parse(favoritesStr) : {}; + }); + + const handleFavoriteChange = (rolloutName: string, isFavorite: boolean) => { + const newFavorites = {...favorites}; + if (isFavorite) { + newFavorites[rolloutName] = true; + } else { + delete newFavorites[rolloutName]; + } + setFavorites(newFavorites); + localStorage.setItem('rolloutsFavorites', JSON.stringify(newFavorites)); + }; + + const filteredRollouts = React.useMemo(() => { + console.log('filteredRollouts', filters); + let nameFilterRegex: RegExp = null; + if (filters.name) { + try { + nameFilterRegex = new RegExp(filters.name, 'i'); + } catch (e) { + console.error(e); + } + } + + return rollouts.filter((r) => { + if (filters.showFavorites && !favorites[r.objectMeta.name]) { + return false; + } + if (filters.showRequiresAttention && r.status !== 'Degraded' && r.status !== 'Paused' && r.message !== 'CanaryPauseStep') { + return false; + } + if (Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]) { + return false; + } + if (nameFilterRegex && !nameFilterRegex.test(r.objectMeta.name)) { + return false; + } + return true; + }); + }, [rollouts, filters]); + + return ( +
+ +
+ {loading ? ( +
+ + Loading... +
+ ) : (rollouts || []).length > 0 ? ( + + {filters.displayMode === 'table' && } + {filters.displayMode !== 'table' && } + + ) : ( + + )} +
+
+ ); +}; + +const EmptyMessage = (props: {namespace: string}) => { + const CodeLine = (props: {children: string}) => { + return
 navigator.clipboard.writeText(props.children)}>{props.children}
; + }; + return ( +
+

No Rollouts to display!

+
+
Make sure you are running the API server in the correct namespace. Your current namespace is:
+
+ {props.namespace} +
+
+
+ To create a new Rollout and Service, run + kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/basic/rollout.yaml + kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/basic/service.yaml + or follow the{' '} + + Getting Started guide + + . +
+
+ ); +}; diff --git a/ui/src/app/components/rollouts-list/rollouts-list.tsx b/ui/src/app/components/rollouts-list/rollouts-list.tsx deleted file mode 100644 index e8c9a4dc5f..0000000000 --- a/ui/src/app/components/rollouts-list/rollouts-list.tsx +++ /dev/null @@ -1,258 +0,0 @@ -import * as React from 'react'; -import {Key, KeybindingContext, useNav} from 'react-keyhooks'; -import {Link, useHistory} from 'react-router-dom'; -import {RolloutInfo} from '../../../models/rollout/rollout'; -import {NamespaceContext} from '../../shared/context/api'; -import {useWatchRollout, useWatchRollouts} from '../../shared/services/rollout'; -import {useClickOutside} from '../../shared/utils/utils'; -import {ParsePodStatus, PodStatus, ReplicaSets} from '../pods/pods'; -import {RolloutAction, RolloutActionButton} from '../rollout-actions/rollout-actions'; -import {RolloutStatus, StatusIcon} from '../status-icon/status-icon'; -import './rollouts-list.scss'; -import {AutoComplete, Tooltip} from 'antd'; -import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; -import {faCircleNotch, faRedoAlt} from '@fortawesome/free-solid-svg-icons'; -import {InfoItemKind, InfoItemRow} from '../info-item/info-item'; - -const useRolloutNames = (rollouts: RolloutInfo[]) => { - const parseNames = (rl: RolloutInfo[]) => - (rl || []).map((r) => { - const name = r.objectMeta?.name || ''; - return { - label: name, - value: name, - }; - }); - - const [rolloutNames, setRolloutNames] = React.useState(parseNames(rollouts)); - React.useEffect(() => { - setRolloutNames(parseNames(rollouts)); - }, [rollouts]); - - return rolloutNames; -}; - -export const RolloutsList = () => { - const rolloutsList = useWatchRollouts(); - const rollouts = rolloutsList.items; - const loading = rolloutsList.loading; - const [filteredRollouts, setFilteredRollouts] = React.useState(rollouts); - const [pos, nav, reset] = useNav(filteredRollouts.length); - const [searchString, setSearchString] = React.useState(''); - const searchParam = new URLSearchParams(window.location.search).get('q'); - React.useEffect(() => { - if (searchParam && searchParam != searchString) { - setSearchString(searchParam); - } - }, []); - - const searchRef = React.useRef(null); - - React.useEffect(() => { - if (searchRef.current) { - // or, if Input component in your ref, then use input property like: - // searchRef.current.input.focus(); - searchRef.current.focus(); - } - }, [searchRef]); - - const {useKeybinding} = React.useContext(KeybindingContext); - - useKeybinding(Key.RIGHT, () => nav(1)); - useKeybinding(Key.LEFT, () => nav(-1)); - useKeybinding(Key.ESCAPE, () => { - reset(); - if (searchString && searchString !== '') { - setSearchString(''); - return true; - } else { - return false; - } - }); - - const rolloutNames = useRolloutNames(rollouts); - const history = useHistory(); - - useKeybinding(Key.SLASH, () => { - if (!searchString) { - if (searchRef) { - searchRef.current.focus(); - } - return true; - } - return false; - }); - - useKeybinding(Key.ENTER, () => { - if (pos > -1) { - history.push(`/rollout/${filteredRollouts[pos].objectMeta?.name}`); - return true; - } - return false; - }); - - React.useEffect(() => { - const filtered = (rollouts || []).filter((r) => (r.objectMeta?.name || '').includes(searchString)); - if ((filtered || []).length > 0) { - setFilteredRollouts(filtered); - } - if (searchString) { - history.replace(`/${namespaceCtx.namespace}?q=${searchString}`); - } else { - history.replace(`/${namespaceCtx.namespace}`); - } - }, [searchString, rollouts]); - - const namespaceCtx = React.useContext(NamespaceContext); - - return ( -
- {loading ? ( -
- - Loading... -
- ) : (rollouts || []).length > 0 ? ( - -
-
- history.push(`/rollout/${namespaceCtx.namespace}/${val}`)} - options={rolloutNames} - onChange={(val) => setSearchString(val)} - value={searchString} - ref={searchRef} - /> -
-
-
- {(filteredRollouts.sort((a, b) => (a.objectMeta.name < b.objectMeta.name ? -1 : 1)) || []).map((rollout, i) => ( - reset()} /> - ))} -
-
- ) : ( - - )} -
- ); -}; - -const EmptyMessage = (props: {namespace: string}) => { - const CodeLine = (props: {children: string}) => { - return
 navigator.clipboard.writeText(props.children)}>{props.children}
; - }; - return ( -
-

No Rollouts to display!

-
-
Make sure you are running the API server in the correct namespace. Your current namespace is:
-
- {props.namespace} -
-
-
- To create a new Rollout and Service, run - kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/basic/rollout.yaml - kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/basic/service.yaml - or follow the{' '} - - Getting Started guide - - . -
-
- ); -}; - -export const isInProgress = (rollout: RolloutInfo): boolean => { - for (const rs of rollout.replicaSets || []) { - for (const p of rs.pods || []) { - const status = ParsePodStatus(p.status); - if (status === PodStatus.Pending) { - return true; - } - } - } - return false; -}; - -export const RolloutWidget = (props: {rollout: RolloutInfo; deselect: () => void; selected?: boolean}) => { - const [watching, subscribe] = React.useState(false); - let rollout = props.rollout; - useWatchRollout(props.rollout?.objectMeta?.name, watching, null, (r: RolloutInfo) => (rollout = r)); - const ref = React.useRef(null); - useClickOutside(ref, props.deselect); - - React.useEffect(() => { - if (watching) { - const to = setTimeout(() => { - if (!isInProgress(rollout)) { - subscribe(false); - } - }, 5000); - return () => clearTimeout(to); - } - }, [watching, rollout]); - - return ( - - { - subscribe(true); - setTimeout(() => { - subscribe(false); - }, 1000); - }} - /> -
- - {(rollout.strategy || '').toLocaleLowerCase() === 'canary' && } -
- {(rollout.replicaSets || []).length < 1 && } - -
- subscribe(true)} indicateLoading /> - subscribe(true)} indicateLoading /> -
- - ); -}; - -const WidgetHeader = (props: {rollout: RolloutInfo; refresh: () => void}) => { - const {rollout} = props; - const [loading, setLoading] = React.useState(false); - React.useEffect(() => { - setTimeout(() => setLoading(false), 500); - }, [loading]); - return ( -
- {rollout.objectMeta?.name} - - - { - props.refresh(); - setLoading(true); - e.preventDefault(); - }} - /> - - - -
- ); -}; diff --git a/ui/src/app/components/rollouts-table/rollouts-table.scss b/ui/src/app/components/rollouts-table/rollouts-table.scss new file mode 100644 index 0000000000..9c5eee36e0 --- /dev/null +++ b/ui/src/app/components/rollouts-table/rollouts-table.scss @@ -0,0 +1,14 @@ +@import 'node_modules/argo-ui/v2/styles/colors'; + +.rollouts-table { + width: 100%; +} + +.rollouts-table_widget_actions { + display: flex; + flex-wrap: wrap; +} + +.rollouts-table_widget_actions_button { + margin-top: 10px; +} diff --git a/ui/src/app/components/rollouts-table/rollouts-table.tsx b/ui/src/app/components/rollouts-table/rollouts-table.tsx new file mode 100644 index 0000000000..151e96553f --- /dev/null +++ b/ui/src/app/components/rollouts-table/rollouts-table.tsx @@ -0,0 +1,223 @@ +import * as React from 'react'; +import {Tooltip, Table} from 'antd'; + +import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; +import {IconDefinition} from '@fortawesome/fontawesome-svg-core'; +import {faStar as faStarSolid} from '@fortawesome/free-solid-svg-icons'; +import {faStar as faStarOutline} from '@fortawesome/free-regular-svg-icons/faStar'; + +import {RolloutAction, RolloutActionButton} from '../rollout-actions/rollout-actions'; +import {RolloutStatus, StatusIcon} from '../status-icon/status-icon'; +import {ReplicaSetStatus, ReplicaSetStatusIcon} from '../status-icon/status-icon'; +import {RolloutInfo} from '../../../models/rollout/rollout'; +import {InfoItemKind, InfoItemRow} from '../info-item/info-item'; +import './rollouts-table.scss'; + +//({rollouts}:{rollouts: RolloutInfo[]}) => { +export const RolloutsTable = ({ + rollouts, + onFavoriteChange, + favorites, +}: { + rollouts: RolloutInfo[]; + onFavoriteChange: (rolloutName: string, isFavorite: boolean) => void; + favorites: {[key: string]: boolean}; +}) => { + const handleFavoriteChange = (rolloutName: string, isFavorite: boolean) => { + onFavoriteChange(rolloutName, isFavorite); + }; + + const data = rollouts + .map((rollout) => { + return { + ...rollout, + key: rollout.objectMeta?.uid, + favorite: favorites[rollout.objectMeta?.name] || false, + }; + }) + .sort((a, b) => { + if (a.favorite && !b.favorite) { + return -1; + } else if (!a.favorite && b.favorite) { + return 1; + } else { + return 0; + } + }); + + const columns = [ + { + dataIndex: 'favorite', + key: 'favorite', + render: (favorite: boolean, rollout: RolloutInfo) => { + return favorite ? ( + + ) : ( + + ); + }, + width: 50, + }, + { + title: 'Name', + dataIndex: 'objectMeta', + key: 'name', + width: 300, + render: (objectMeta: {name?: string}) => objectMeta.name, + sorter: (a: any, b: any) => a.objectMeta.name.localeCompare(b.objectMeta.name), + }, + { + title: 'Strategy', + dataIndex: 'strategy', + key: 'strategy', + align: 'left' as const, + sorter: (a: any, b: any) => a.strategy.localeCompare(b.strategy), + render: (strategy: string) => { + return ( + + ); + }, + }, + { + title: 'Step', + dataIndex: 'step', + key: 'step', + render: (text: any, record: {step?: string}) => record.step || '-', + sorter: (a: any, b: any) => { + if (a.step === undefined) { + return -1; + } + if (b.step === undefined) { + return 1; + } else return a.step.localeCompare(b.step); + }, + }, + { + title: 'Weight', + dataIndex: 'setWeight', + key: 'weight', + render: (text: any, record: {setWeight?: number}) => record.setWeight || '-', + sorter: (a: any, b: any) => a.setWeight - b.setWeight, + }, + { + title: 'ReplicaSets', + key: 'replicasets', + width: 200, + sorter: (a: RolloutInfo, b: RolloutInfo) => a.desired - b.desired, + render: (rollout: RolloutInfo) => { + const stableReplicaSets = rollout.replicaSets?.filter((rs) => rs.stable); + const canaryReplicaSets = rollout.replicaSets?.filter((rs) => rs.canary); + const previewReplicaSets = rollout.replicaSets?.filter((rs) => rs.preview); + return ( +
+ {stableReplicaSets?.length > 0 && ( +
+ Stable:{' '} + {stableReplicaSets.map((rs) => ( + + + Rev {rs.revision} ({rs.available}/{rs.replicas}) + + + ))} +
+ )} + {canaryReplicaSets?.length > 0 && ( +
+ Canary:{' '} + {canaryReplicaSets.map((rs) => ( + + + Rev {rs.revision} ({rs.available}/{rs.replicas}) + + + ))} +
+ )} + {previewReplicaSets?.length > 0 && ( +
+ Preview:{' '} + {previewReplicaSets.map((rs) => ( + + + Rev {rs.revision} ({rs.available}/{rs.replicas}) + + + ))} +
+ )} +
+ ); + }, + }, + { + title: 'Status', + sorter: (a: any, b: any) => a.status.localeCompare(b.status), + render: (record: {message?: string; status?: string}) => { + return ( +
+ + {record.status} + +
+ ); + }, + }, + { + title: 'Actions', + dataIndex: 'actions', + key: 'actions', + render: (text: any, rollout: {objectMeta?: {name?: string}}) => { + return ( +
+
+ {}} indicateLoading /> +
+
+ {}} indicateLoading /> +
+
+ {}} indicateLoading /> +
+
+ {}} indicateLoading /> +
+
+ ); + }, + }, + ]; + + return ( + record.objectMeta?.uid || ''} + style={{width: '100%', padding: '20px 20px'}} + rowClassName='rollouts-table__row' + onRow={(record: RolloutInfo) => ({ + onClick: () => { + window.location.href = `/rollout/${record.objectMeta?.name}`; + }, + style: {cursor: 'pointer'}, + })} + /> + ); +}; diff --git a/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.scss b/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.scss new file mode 100644 index 0000000000..81e228822e --- /dev/null +++ b/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.scss @@ -0,0 +1,43 @@ +@import 'node_modules/argo-ui/v2/styles/colors'; + +.rollouts-toolbar { + display: flex; + justify-content: space-between; + align-items: center; + padding: 10px 10px; + border-bottom: 1px solid #fff; + background-color: #fff; +} + +.rollouts-toolbar_requires-attention-checkbox { + flex: 2; + padding-left: 20px; +} + +.rollouts-toolbar_search-container { + min-width: 300px; + padding-left: 20px; + padding-right: 20px; +} + +.rollouts-toolbar_mode-button { + color: #989898; + border: none; + padding: 5px; + cursor: pointer; + transition: background-color 0.3s ease; + font-size: 24px; // increase the font-size to make the icon larger +} + +.rollouts-toolbar_mode-button:hover { + background-color: #b2b2b2; +} + +.rollouts-toolbar_mode-button.active { + color: #000000; +} + +.rollouts-toolbar_status-button { + cursor: pointer; + transition: background-color 0.3s ease; +} diff --git a/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.tsx b/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.tsx new file mode 100644 index 0000000000..6e9771c9ab --- /dev/null +++ b/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.tsx @@ -0,0 +1,198 @@ +import * as React from 'react'; + +import {useHistory, useLocation} from 'react-router-dom'; + +import {AutoComplete} from 'antd'; +import {Tooltip} from 'antd'; + +import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; +import {faTableList, faTableCellsLarge} from '@fortawesome/free-solid-svg-icons'; + +import {RolloutInfo} from '../../../models/rollout/rollout'; +import {StatusCount} from '../status-count/status-count'; +import './rollouts-toolbar.scss'; + +export type Filters = { + showRequiresAttention: boolean; + showFavorites?: boolean; + name: string; + displayMode?: string; + status: { + [key: string]: boolean; + }; +}; + +interface StatusCount { + [key: string]: number; +} + +export const defaultDisplayMode = 'table'; + +export const RolloutsToolbar = ({ + rollouts, + favorites, + onFilterChange, +}: { + rollouts: RolloutInfo[]; + favorites: {[key: string]: boolean}; + onFilterChange: (filters: Filters) => void; +}) => { + const history = useHistory(); + const location = useLocation(); + const searchParams = new URLSearchParams(window.location.search); + const [filters, setFilters] = React.useState({ + showRequiresAttention: searchParams.get('showRequiresAttention') === 'true', + showFavorites: searchParams.get('showFavorites') === 'true', + name: searchParams.get('name') || '', + displayMode: searchParams.get('displayMode') || defaultDisplayMode, + status: { + Progressing: searchParams.get('Progressing') === 'true', + Degraded: searchParams.get('Degraded') === 'true', + Paused: searchParams.get('Paused') === 'true', + Healthy: searchParams.get('Healthy') === 'true', + }, + }); + // Ensure that the filters are updated when the URL changes + onFilterChange(filters); + + const handleFilterChange = (newFilters: Filters) => { + setFilters(newFilters); + onFilterChange(newFilters); + }; + + const handleNameFilterChange = (value: string) => { + const newFilters = { + ...filters, + name: value, + }; + const searchParams = new URLSearchParams(location.search); + if (value) { + searchParams.set('name', value); + } else { + searchParams.delete('name'); + } + history.push({search: searchParams.toString()}); + handleFilterChange(newFilters); + }; + + const handleShowRequiresAttentionChange = (event: React.MouseEvent) => { + const newFilters = { + ...filters, + showRequiresAttention: !filters.showRequiresAttention, + }; + const searchParams = new URLSearchParams(location.search); + if (!filters.showRequiresAttention) { + searchParams.set('showRequiresAttention', 'true'); + } else { + searchParams.delete('showRequiresAttention'); + } + history.push({search: searchParams.toString()}); + handleFilterChange(newFilters); + }; + + const handleShowFavoritesChange = (event: React.MouseEvent) => { + const newFilters = { + ...filters, + showFavorites: !filters.showFavorites, + }; + const searchParams = new URLSearchParams(location.search); + if (!filters.showFavorites) { + searchParams.set('showFavorites', 'true'); + } else { + searchParams.delete('showFavorites'); + } + history.push({search: searchParams.toString()}); + handleFilterChange(newFilters); + }; + + const handleDisplayModeChange = (event: React.MouseEvent) => { + const newFilters = { + ...filters, + displayMode: event.currentTarget.id, + }; + const searchParams = new URLSearchParams(location.search); + if (event.currentTarget.id !== defaultDisplayMode) { + searchParams.set('displayMode', event.currentTarget.id); + } else { + searchParams.delete('displayMode'); + } + history.push({search: searchParams.toString()}); + handleFilterChange(newFilters); + }; + + const handleStatusFilterChange = (event: React.MouseEvent) => { + const newFilters = { + ...filters, + status: { + ...filters.status, + [event.currentTarget.id]: !filters.status[event.currentTarget.id], + }, + }; + const searchParams = new URLSearchParams(location.search); + if (event.currentTarget.id) { + searchParams.set(event.currentTarget.id, 'true'); + } else { + searchParams.delete(event.currentTarget.id); + } + history.push({search: searchParams.toString()}); + handleFilterChange(newFilters); + }; + + const statusCounts: StatusCount = React.useMemo(() => { + const counts: StatusCount = { + Progressing: 0, + Degraded: 0, + Paused: 0, + Healthy: 0, + }; + rollouts.forEach((r) => { + counts[r.status]++; + }); + + return counts; + }, [rollouts]); + + const needsAttentionCount: number = React.useMemo(() => { + const pausedRollouts = rollouts.filter((r) => r.status === 'Paused' && r.message !== 'CanaryPauseStep'); + return statusCounts['Degraded'] + pausedRollouts.length; + }, [rollouts, statusCounts]); + + const favoriteCount: number = React.useMemo(() => { + return rollouts.filter((r) => favorites[r.objectMeta.name]).length; + }, [rollouts, favorites]); + + return ( +
+
+ + + + + + + {Object.keys(statusCounts).map((status: string) => { + return ( + + + + ); + })} +
+
+ + +
+ +
+ ); +}; diff --git a/ui/src/app/components/status-count/status-count.scss b/ui/src/app/components/status-count/status-count.scss new file mode 100644 index 0000000000..9dec534d27 --- /dev/null +++ b/ui/src/app/components/status-count/status-count.scss @@ -0,0 +1,31 @@ +@import 'node_modules/argo-ui/v2/styles/colors'; + +.status-count { + display: flex; + align-items: center; + border: 1px solid $argo-color-gray-4; + border-radius: 5px; + padding: 2px; + margin: 1px; + + &__icon { + font-size: 15px; + color: $argo-color-gray-8; + margin: 5px; + + text-align: center; + flex: 0 0 auto; + } + + &__count { + font-size: 15px; + font-weight: 500; + color: $argo-color-gray-8; + margin-right: 5px; + text-align: right; + flex: 1; + } +} +.status-count.active { + background-color: $argo-color-teal-2; +} diff --git a/ui/src/app/components/status-count/status-count.tsx b/ui/src/app/components/status-count/status-count.tsx new file mode 100644 index 0000000000..83cea4f5ac --- /dev/null +++ b/ui/src/app/components/status-count/status-count.tsx @@ -0,0 +1,16 @@ +import * as React from 'react'; + +import {RolloutStatus, StatusIcon} from '../status-icon/status-icon'; + +import './status-count.scss'; + +export const StatusCount = ({status, count, defaultIcon = 'fa-exclamation-circle', active = false}: {status: String; count: Number; defaultIcon?: String; active?: boolean}) => { + return ( +
+
+ +
+
{count}
+
+ ); +}; diff --git a/ui/src/app/components/status-icon/status-icon.tsx b/ui/src/app/components/status-icon/status-icon.tsx index 257dc50567..5da619a357 100644 --- a/ui/src/app/components/status-icon/status-icon.tsx +++ b/ui/src/app/components/status-icon/status-icon.tsx @@ -9,9 +9,11 @@ export enum RolloutStatus { Healthy = 'Healthy', } -export const StatusIcon = (props: {status: RolloutStatus}): JSX.Element => { +export const StatusIcon = (props: {status: RolloutStatus; showTooltip?: boolean; defaultIcon?: String}): JSX.Element => { let icon, className; let spin = false; + const showTooltip = props.showTooltip ?? true; + const defaultIcon = props.defaultIcon ?? 'fa-question-circle'; const {status} = props; switch (status) { case 'Progressing': { @@ -36,14 +38,19 @@ export const StatusIcon = (props: {status: RolloutStatus}): JSX.Element => { break; } default: { - icon = 'fa-question-circle'; + icon = defaultIcon; className = 'unknown'; } } return ( - - - + + {showTooltip && ( + + + + )} + {!showTooltip && } + ); }; @@ -55,9 +62,11 @@ export enum ReplicaSetStatus { Progressing = 'Progressing', } -export const ReplicaSetStatusIcon = (props: {status: ReplicaSetStatus}) => { +export const ReplicaSetStatusIcon = (props: {status: ReplicaSetStatus; showTooltip?: boolean; defaultIcon?: String}) => { let icon, className; let spin = false; + const showTooltip = props.showTooltip ?? true; + const defaultIcon = props.defaultIcon ?? 'fa-question-circle'; const {status} = props; switch (status) { case 'Healthy': @@ -83,13 +92,18 @@ export const ReplicaSetStatusIcon = (props: {status: ReplicaSetStatus}) => { break; } default: { - icon = 'fa-question-circle'; + icon = defaultIcon; className = 'unknown'; } } return ( - - - + + {showTooltip && ( + + + + )} + {!showTooltip && } + ); }; diff --git a/ui/src/app/index.tsx b/ui/src/app/index.tsx index 3bc5d04223..56521a1185 100644 --- a/ui/src/app/index.tsx +++ b/ui/src/app/index.tsx @@ -6,5 +6,5 @@ ReactDOM.render( , - document.getElementById('root') + document.getElementById('root'), ); diff --git a/ui/src/models/rollout/analysisrun.tsx b/ui/src/models/rollout/analysisrun.tsx new file mode 100644 index 0000000000..b5129f7d9f --- /dev/null +++ b/ui/src/models/rollout/analysisrun.tsx @@ -0,0 +1,4 @@ +import * as Generated from './generated'; + +export type RolloutInfo = Generated.RolloutRolloutInfo; +export type Pod = Generated.RolloutPodInfo; From e010441d407293a0bcc4fff91055d9f159c1568d Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Sat, 7 Oct 2023 13:55:16 -0400 Subject: [PATCH 002/187] use comma based search --- .../rollouts-home/rollouts-home.tsx | 26 +++++++++++-------- ui/yarn.lock | 12 +++++++++ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index 34548c9bd4..2f55a9bf74 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -52,14 +52,6 @@ export const RolloutsHome = () => { const filteredRollouts = React.useMemo(() => { console.log('filteredRollouts', filters); - let nameFilterRegex: RegExp = null; - if (filters.name) { - try { - nameFilterRegex = new RegExp(filters.name, 'i'); - } catch (e) { - console.error(e); - } - } return rollouts.filter((r) => { if (filters.showFavorites && !favorites[r.objectMeta.name]) { @@ -71,12 +63,24 @@ export const RolloutsHome = () => { if (Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]) { return false; } - if (nameFilterRegex && !nameFilterRegex.test(r.objectMeta.name)) { - return false; + let nameMatches = false; + for (let term of filters.name.split(',').map(t => t.trim())) { + if (term === '') continue; // Skip empty terms + if (term.startsWith('!')) { + if (!r.objectMeta.name.includes(term.substring(1))) { + nameMatches = true; + break; + } + } else if (r.objectMeta.name.includes(term)) { + nameMatches = true; + break; + } } + + if (!nameMatches) return false; return true; }); - }, [rollouts, filters]); + }, [rollouts, filters, favorites]); return (
diff --git a/ui/yarn.lock b/ui/yarn.lock index 29f5446d37..af1a13d826 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -1326,6 +1326,11 @@ resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.4.0.tgz#88da2b70d6ca18aaa6ed3687832e11f39e80624b" integrity sha512-HNii132xfomg5QVZw0HwXXpN22s7VBHQBv9CeOu9tfJnhsWQNd2lmTNi8CSrnw5B+5YOmzu1UoPAyxaXsJ6RgQ== +"@fortawesome/fontawesome-common-types@6.4.2": + version "6.4.2" + resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.4.2.tgz#1766039cad33f8ad87f9467b98e0d18fbc8f01c5" + integrity sha512-1DgP7f+XQIJbLFCTX1V2QnxVmpLdKdzzo2k8EmvDOePfchaIGQ9eCHj2up3/jNEbZuBqel5OxiaOJf37TWauRA== + "@fortawesome/fontawesome-free@^5.8.1": version "5.15.4" resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.4.tgz#ecda5712b61ac852c760d8b3c79c96adca5554e5" @@ -1338,6 +1343,13 @@ dependencies: "@fortawesome/fontawesome-common-types" "6.4.0" +"@fortawesome/free-regular-svg-icons@^6.4.0": + version "6.4.2" + resolved "https://registry.yarnpkg.com/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-6.4.2.tgz#aee79ed76ce5dd04931352f9d83700761b8b1b25" + integrity sha512-0+sIUWnkgTVVXVAPQmW4vxb9ZTHv0WstOa3rBx9iPxrrrDH6bNLsDYuwXF9b6fGm+iR7DKQvQshUH/FJm3ed9Q== + dependencies: + "@fortawesome/fontawesome-common-types" "6.4.2" + "@fortawesome/free-solid-svg-icons@^6.4.0": version "6.4.0" resolved "https://registry.yarnpkg.com/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.4.0.tgz#48c0e790847fa56299e2f26b82b39663b8ad7119" From c6746aace8485c3e7a069e42a6750eb8e1f849f6 Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Sun, 8 Oct 2023 17:07:01 -0400 Subject: [PATCH 003/187] add labels and annotations to RolloutInfo response --- pkg/kubectl-argo-rollouts/info/rollout_info.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/kubectl-argo-rollouts/info/rollout_info.go b/pkg/kubectl-argo-rollouts/info/rollout_info.go index 59ee3f076a..8afc8cf02f 100644 --- a/pkg/kubectl-argo-rollouts/info/rollout_info.go +++ b/pkg/kubectl-argo-rollouts/info/rollout_info.go @@ -29,6 +29,8 @@ func NewRolloutInfo( ObjectMeta: &v1.ObjectMeta{ Name: ro.Name, Namespace: ro.Namespace, + Labels: ro.Labels, + Annotations: ro.Annotations, UID: ro.UID, CreationTimestamp: ro.CreationTimestamp, ResourceVersion: ro.ObjectMeta.ResourceVersion, From 866dc01ef889f10088617a9fd64061662956b5e0 Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Tue, 10 Oct 2023 11:01:51 -0400 Subject: [PATCH 004/187] noop From 3cb27944dd56520a4a56df1ea89c3961fc57e21a Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Wed, 11 Oct 2023 10:30:06 -0400 Subject: [PATCH 005/187] improved name filter --- ui/src/app/components/rollouts-home/rollouts-home.tsx | 9 +++------ .../components/rollouts-toolbar/rollouts-toolbar.scss | 4 ++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index 2f55a9bf74..6c1766dc32 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -51,8 +51,6 @@ export const RolloutsHome = () => { }; const filteredRollouts = React.useMemo(() => { - console.log('filteredRollouts', filters); - return rollouts.filter((r) => { if (filters.showFavorites && !favorites[r.objectMeta.name]) { return false; @@ -64,8 +62,8 @@ export const RolloutsHome = () => { return false; } let nameMatches = false; - for (let term of filters.name.split(',').map(t => t.trim())) { - if (term === '') continue; // Skip empty terms + for (let term of filters.name.split(',').map((t) => t.trim())) { + if (term === '') continue; // Skip empty terms if (term.startsWith('!')) { if (!r.objectMeta.name.includes(term.substring(1))) { nameMatches = true; @@ -76,8 +74,7 @@ export const RolloutsHome = () => { break; } } - - if (!nameMatches) return false; + if (filters.name != '' && !nameMatches) return false; return true; }); }, [rollouts, filters, favorites]); diff --git a/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.scss b/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.scss index 81e228822e..5acb36c0dc 100644 --- a/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.scss +++ b/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.scss @@ -20,6 +20,10 @@ padding-right: 20px; } +.rollouts-toolbar_display-modes { + margin-left: auto; +} + .rollouts-toolbar_mode-button { color: #989898; border: none; From 7c4f01e5409687589e058a93823fa898119d9442 Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Wed, 11 Oct 2023 13:30:06 -0400 Subject: [PATCH 006/187] formatting --- ui/src/app/components/rollout/revision.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ui/src/app/components/rollout/revision.tsx b/ui/src/app/components/rollout/revision.tsx index e2fcd11526..bd7f7410ce 100644 --- a/ui/src/app/components/rollout/revision.tsx +++ b/ui/src/app/components/rollout/revision.tsx @@ -68,7 +68,8 @@ export const RevisionWidget = (props: RevisionWidgetProps) => { onClick={() => props.rollback(Number(revision.number))} type='default' icon={} - style={{fontSize: '13px', marginRight: '10px'}}> + style={{fontSize: '13px', marginRight: '10px'}} + > Rollback )} @@ -123,11 +124,13 @@ const AnalysisRunWidget = (props: {analysisRuns: RolloutAnalysisRunInfo[]}) => { {ar.status}
- }> + } + >
+ }`} + > @@ -201,7 +204,8 @@ const AnalysisRunWidget = (props: {analysisRuns: RolloutAnalysisRunInfo[]}) => { )} ); - })}> + })} + >
@@ -264,7 +268,8 @@ const AnalysisRunWidget = (props: {analysisRuns: RolloutAnalysisRunInfo[]}) => { )} ); - })}> + })} + > From a1b1946ca13a13edb4dd353fa4f46527786b0627 Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Wed, 11 Oct 2023 14:20:16 -0400 Subject: [PATCH 007/187] cleanup Signed-off-by: Philip Clark --- ui/src/app/components/rollout-actions/rollout-actions.tsx | 3 --- ui/src/app/components/rollout-widget/rollout-widget.scss | 3 --- ui/src/app/components/rollout-widget/rollout-widget.tsx | 1 - ui/src/app/components/rollouts-grid/rollouts-grid.tsx | 4 ---- ui/src/app/components/rollouts-home/rollouts-home.tsx | 5 ++--- 5 files changed, 2 insertions(+), 14 deletions(-) diff --git a/ui/src/app/components/rollout-actions/rollout-actions.tsx b/ui/src/app/components/rollout-actions/rollout-actions.tsx index 2eaad61502..81b5ce1ead 100644 --- a/ui/src/app/components/rollout-actions/rollout-actions.tsx +++ b/ui/src/app/components/rollout-actions/rollout-actions.tsx @@ -25,7 +25,6 @@ interface ActionData { shouldConfirm?: boolean; } -// export const RolloutActionButton = (props: {action: RolloutAction; rollout: RolloutInfo; callback?: Function; indicateLoading: boolean; disabled?: boolean}) => { export const RolloutActionButton = React.memo( ({action, rollout, callback, indicateLoading, disabled}: {action: RolloutAction; rollout: RolloutInfo; callback?: Function; indicateLoading: boolean; disabled?: boolean}) => { const [loading, setLoading] = React.useState(false); @@ -92,8 +91,6 @@ export const RolloutActionButton = React.memo( const ap = actionMap.get(action); - // const [loading, setLoading] = React.useState(false); - return ( void /> {(rollout.strategy || '').toLocaleLowerCase() === 'canary' && } - {/* {(rollout.replicaSets || []).length < 1 && } */}
{rollout.message !== 'CanaryPauseStep' && rollout.message}
diff --git a/ui/src/app/components/rollouts-grid/rollouts-grid.tsx b/ui/src/app/components/rollouts-grid/rollouts-grid.tsx index 1692d637b6..0784257905 100644 --- a/ui/src/app/components/rollouts-grid/rollouts-grid.tsx +++ b/ui/src/app/components/rollouts-grid/rollouts-grid.tsx @@ -5,10 +5,6 @@ import {RolloutInfo} from '../../../models/rollout/rollout'; import {RolloutWidget} from '../rollout-widget/rollout-widget'; export const RolloutsGrid = ({rollouts}: {rollouts: RolloutInfo[]}) => { - // ({ rollouts, onFavoriteChange, favorites }: { rollouts: RolloutInfo[], onFavoriteChange: (rollout: RolloutInfo) => void, favorites: { [key: string]: boolean } }) => { - // const handleFavoriteChange = (rollout: RolloutInfo) => { - // onFavoriteChange(rollout); - // }; return (
{rollouts.map((rollout, i) => ( diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index 6c1766dc32..cb2fde0a00 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -5,10 +5,9 @@ import {faCircleNotch} from '@fortawesome/free-solid-svg-icons'; import {NamespaceContext} from '../../shared/context/api'; import {useWatchRollouts} from '../../shared/services/rollout'; -import {RolloutsToolbar, defaultDisplayMode} from '../rollouts-toolbar/rollouts-toolbar'; +import {RolloutsToolbar, defaultDisplayMode, Filters} from '../rollouts-toolbar/rollouts-toolbar'; import {RolloutsTable} from '../rollouts-table/rollouts-table'; import {RolloutsGrid} from '../rollouts-grid/rollouts-grid'; -import {Filters} from '../rollouts-toolbar/rollouts-toolbar'; import './rollouts-home.scss'; export const RolloutsHome = () => { @@ -49,7 +48,7 @@ export const RolloutsHome = () => { setFavorites(newFavorites); localStorage.setItem('rolloutsFavorites', JSON.stringify(newFavorites)); }; - + const filteredRollouts = React.useMemo(() => { return rollouts.filter((r) => { if (filters.showFavorites && !favorites[r.objectMeta.name]) { From 892803255a24466185875839a5fa45d929f21671 Mon Sep 17 00:00:00 2001 From: Daniel Wright Date: Wed, 6 Sep 2023 01:23:02 +1000 Subject: [PATCH 008/187] docs: replace `patchesStrategicMerge` with `patches` in tests/docs (#3010) This update ensures documentation and test examples reflect the use of the newer `patches` method, transitioning away from the deprecated `patchesStrategicMerge`. This aligns with current best practices and recommendations from the kustomize project. Signed-off-by: Daniel Wright Signed-off-by: Philip Clark --- docs/features/kustomize.md | 26 +++++++++---------- examples/notifications/kustomization.yaml | 4 +-- .../namespace-install/kustomization.yaml | 4 +-- manifests/notifications/kustomization.yaml | 20 +++++++------- test/kustomize/rollout/kustomization.yaml | 24 ++++++++--------- 5 files changed, 39 insertions(+), 39 deletions(-) diff --git a/docs/features/kustomize.md b/docs/features/kustomize.md index 4efa4144a0..e1a691b511 100644 --- a/docs/features/kustomize.md +++ b/docs/features/kustomize.md @@ -4,7 +4,7 @@ Kustomize can be extended to understand CRD objects through the use of [transformer configs](https://github.com/kubernetes-sigs/kustomize/tree/master/examples/transformerconfigs). Using transformer configs, kustomize can be "taught" about the structure of a Rollout object and leverage kustomize features such as ConfigMap/Secret generators, variable references, and common -labels & annotations. To use Rollouts with kustomize: +labels & annotations. To use Rollouts with kustomize: 1. Download [`rollout-transform.yaml`](kustomize/rollout-transform.yaml) into your kustomize directory. @@ -65,18 +65,18 @@ resources: openapi: path: https://raw.githubusercontent.com/argoproj/argo-schema-generator/main/schema/argo_all_k8s_kustomize_schema.json -patchesStrategicMerge: -- |- - apiVersion: argoproj.io/v1alpha1 - kind: Rollout - metadata: - name: rollout-canary - spec: - template: - spec: - containers: - - name: rollouts-demo - image: nginx +patches: +- patch: |- + apiVersion: argoproj.io/v1alpha1 + kind: Rollout + metadata: + name: rollout-canary + spec: + template: + spec: + containers: + - name: rollouts-demo + image: nginx ``` The OpenAPI data is auto-generated and defined in this [file](https://github.com/argoproj/argo-schema-generator/blob/main/schema/argo_all_k8s_kustomize_schema.json). diff --git a/examples/notifications/kustomization.yaml b/examples/notifications/kustomization.yaml index df8b1ffb2f..73154065be 100644 --- a/examples/notifications/kustomization.yaml +++ b/examples/notifications/kustomization.yaml @@ -4,5 +4,5 @@ kind: Kustomization resources: - ../../manifests/notifications -patchesStrategicMerge: -- configmap.yaml \ No newline at end of file +patches: +- path: configmap.yaml diff --git a/manifests/namespace-install/kustomization.yaml b/manifests/namespace-install/kustomization.yaml index 5d902d1c4c..153432ec04 100644 --- a/manifests/namespace-install/kustomization.yaml +++ b/manifests/namespace-install/kustomization.yaml @@ -8,8 +8,8 @@ bases: resources: - argo-rollouts-rolebinding.yaml -patchesStrategicMerge: -- add-namespaced-flag.yaml +patches: +- path: add-namespaced-flag.yaml patchesJson6902: - path: clusterrole-to-role.yaml diff --git a/manifests/notifications/kustomization.yaml b/manifests/notifications/kustomization.yaml index e8b7beeed9..751122f02c 100644 --- a/manifests/notifications/kustomization.yaml +++ b/manifests/notifications/kustomization.yaml @@ -4,13 +4,13 @@ kind: Kustomization resources: - argo-rollouts-notification-configmap.yaml -patchesStrategicMerge: - - on-rollout-completed.yaml - - on-scaling-replica-set.yaml - - on-rollout-step-completed.yaml - - on-rollout-updated.yaml - - on-rollout-aborted.yaml - - on-rollout-paused.yaml - - on-analysis-run-running.yaml - - on-analysis-run-error.yaml - - on-analysis-run-failed.yaml +patches: + - path: on-rollout-completed.yaml + - path: on-scaling-replica-set.yaml + - path: on-rollout-step-completed.yaml + - path: on-rollout-updated.yaml + - path: on-rollout-aborted.yaml + - path: on-rollout-paused.yaml + - path: on-analysis-run-running.yaml + - path: on-analysis-run-error.yaml + - path: on-analysis-run-failed.yaml diff --git a/test/kustomize/rollout/kustomization.yaml b/test/kustomize/rollout/kustomization.yaml index 71a3660e3c..6f451758d9 100644 --- a/test/kustomize/rollout/kustomization.yaml +++ b/test/kustomize/rollout/kustomization.yaml @@ -45,15 +45,15 @@ images: openapi: path: https://raw.githubusercontent.com/argoproj/argo-schema-generator/main/schema/argo_all_k8s_kustomize_schema.json -patchesStrategicMerge: -- |- - apiVersion: argoproj.io/v1alpha1 - kind: Rollout - metadata: - name: guestbook - spec: - template: - spec: - containers: - - name: guestbook - image: guestbook-patched:v1 +patches: +- patch: |- + apiVersion: argoproj.io/v1alpha1 + kind: Rollout + metadata: + name: guestbook + spec: + template: + spec: + containers: + - name: guestbook + image: guestbook-patched:v1 From 307b6ee0083210fa269c3c6a3bb4f9b7500ae3a7 Mon Sep 17 00:00:00 2001 From: pasha-codefresh Date: Tue, 5 Sep 2023 19:03:51 +0300 Subject: [PATCH 009/187] fix: analysis step should be ignored after promote (#3016) * fix: analysis step should be ignored after promote in case if result was inconclusive Signed-off-by: pashakostohrys * fix: analysis step should be ignored after promote in case if result was inconclusive Signed-off-by: pashakostohrys --------- Signed-off-by: pashakostohrys Signed-off-by: Philip Clark --- .../cmd/promote/promote.go | 18 ++++- .../cmd/promote/promote_test.go | 66 +++++++++++++++++++ 2 files changed, 83 insertions(+), 1 deletion(-) diff --git a/pkg/kubectl-argo-rollouts/cmd/promote/promote.go b/pkg/kubectl-argo-rollouts/cmd/promote/promote.go index d71d68573f..166f24c934 100644 --- a/pkg/kubectl-argo-rollouts/cmd/promote/promote.go +++ b/pkg/kubectl-argo-rollouts/cmd/promote/promote.go @@ -34,6 +34,7 @@ const ( setCurrentStepIndex = `{"status":{"currentStepIndex":%d}}` unpausePatch = `{"spec":{"paused":false}}` clearPauseConditionsPatch = `{"status":{"pauseConditions":null}}` + clearPauseConditionsAndControllerPausePatch = `{"status":{"pauseConditions":null, "controllerPause":false, "currentStepIndex":%d}}` unpauseAndClearPauseConditionsPatch = `{"spec":{"paused":false},"status":{"pauseConditions":null}}` promoteFullPatch = `{"status":{"promoteFull":true}}` clearPauseConditionsPatchWithStep = `{"status":{"pauseConditions":null, "currentStepIndex":%d}}` @@ -133,6 +134,10 @@ func PromoteRollout(rolloutIf clientset.RolloutInterface, name string, skipCurre return ro, nil } +func isInconclusive(rollout *v1alpha1.Rollout) bool { + return rollout.Spec.Strategy.Canary != nil && rollout.Status.Canary.CurrentStepAnalysisRunStatus != nil && rollout.Status.Canary.CurrentStepAnalysisRunStatus.Status == v1alpha1.AnalysisPhaseInconclusive +} + func getPatches(rollout *v1alpha1.Rollout, skipCurrentStep, skipAllStep, full bool) ([]byte, []byte, []byte) { var specPatch, statusPatch, unifiedPatch []byte switch { @@ -160,7 +165,18 @@ func getPatches(rollout *v1alpha1.Rollout, skipCurrentStep, skipAllStep, full bo if rollout.Spec.Paused { specPatch = []byte(unpausePatch) } - if len(rollout.Status.PauseConditions) > 0 { + // in case if canary rollout in inconclusive state, we want to unset controller pause , clean pause conditions and increment step index + // so that rollout can proceed to next step + // without such patch, rollout will be stuck in inconclusive state in case if next step is pause step + if isInconclusive(rollout) && len(rollout.Status.PauseConditions) > 0 && rollout.Status.ControllerPause { + _, index := replicasetutil.GetCurrentCanaryStep(rollout) + if index != nil { + if *index < int32(len(rollout.Spec.Strategy.Canary.Steps)) { + *index++ + } + statusPatch = []byte(fmt.Sprintf(clearPauseConditionsAndControllerPausePatch, *index)) + } + } else if len(rollout.Status.PauseConditions) > 0 { statusPatch = []byte(clearPauseConditionsPatch) } else if rollout.Spec.Strategy.Canary != nil { // we only want to clear pause conditions, or increment step index (never both) diff --git a/pkg/kubectl-argo-rollouts/cmd/promote/promote_test.go b/pkg/kubectl-argo-rollouts/cmd/promote/promote_test.go index 25c2b9929d..4a31c0a255 100644 --- a/pkg/kubectl-argo-rollouts/cmd/promote/promote_test.go +++ b/pkg/kubectl-argo-rollouts/cmd/promote/promote_test.go @@ -490,3 +490,69 @@ func TestPromoteCmdAlreadyFullyPromoted(t *testing.T) { assert.Equal(t, stdout, "rollout 'guestbook' fully promoted\n") assert.Empty(t, stderr) } + +func TestPromoteInconclusiveStep(t *testing.T) { + ro := v1alpha1.Rollout{ + ObjectMeta: metav1.ObjectMeta{ + Name: "guestbook", + Namespace: metav1.NamespaceDefault, + }, + Spec: v1alpha1.RolloutSpec{ + Paused: true, + Strategy: v1alpha1.RolloutStrategy{ + Canary: &v1alpha1.CanaryStrategy{ + Steps: []v1alpha1.CanaryStep{ + { + SetWeight: pointer.Int32Ptr(1), + }, + { + SetWeight: pointer.Int32Ptr(2), + }, + }, + }, + }, + }, + Status: v1alpha1.RolloutStatus{ + PauseConditions: []v1alpha1.PauseCondition{{ + Reason: v1alpha1.PauseReasonCanaryPauseStep, + }}, + ControllerPause: true, + Canary: v1alpha1.CanaryStatus{ + CurrentStepAnalysisRunStatus: &v1alpha1.RolloutAnalysisRunStatus{ + Status: v1alpha1.AnalysisPhaseInconclusive, + }, + }, + }, + } + + tf, o := options.NewFakeArgoRolloutsOptions(&ro) + defer tf.Cleanup() + fakeClient := o.RolloutsClient.(*fakeroclient.Clientset) + fakeClient.PrependReactor("patch", "*", func(action kubetesting.Action) (handled bool, ret runtime.Object, err error) { + if patchAction, ok := action.(kubetesting.PatchAction); ok { + patchRo := v1alpha1.Rollout{} + err := json.Unmarshal(patchAction.GetPatch(), &patchRo) + if err != nil { + panic(err) + } + ro.Status.CurrentStepIndex = patchRo.Status.CurrentStepIndex + ro.Status.ControllerPause = patchRo.Status.ControllerPause + ro.Status.PauseConditions = patchRo.Status.PauseConditions + } + return true, &ro, nil + }) + + cmd := NewCmdPromote(o) + cmd.PersistentPreRunE = o.PersistentPreRunE + cmd.SetArgs([]string{"guestbook"}) + + err := cmd.Execute() + assert.Nil(t, err) + assert.Equal(t, false, ro.Status.ControllerPause) + assert.Empty(t, ro.Status.PauseConditions) + + stdout := o.Out.(*bytes.Buffer).String() + stderr := o.ErrOut.(*bytes.Buffer).String() + assert.Equal(t, stdout, "rollout 'guestbook' promoted\n") + assert.Empty(t, stderr) +} From 91a2a7bdfcdb649d5a6bc964037aca4053de5e8e Mon Sep 17 00:00:00 2001 From: izturn <44051386+izturn@users.noreply.github.com> Date: Wed, 6 Sep 2023 01:03:26 +0800 Subject: [PATCH 010/187] refactor: rename interface{} => any (#3000) * rename interface{} => any Signed-off-by: gang.liu * revert change to generated code Signed-off-by: gang.liu --------- Signed-off-by: gang.liu Signed-off-by: Philip Clark --- analysis/controller.go | 20 +-- analysis/controller_test.go | 4 +- controller/metrics/metrics_test.go | 2 +- experiments/controller.go | 36 +++--- experiments/controller_test.go | 10 +- experiments/experiment.go | 4 +- experiments/experiment_test.go | 8 +- hack/gen-crd-spec/main.go | 44 +++---- hack/gen-docs/main.go | 14 +-- ingress/ingress.go | 12 +- ingress/ingress_test.go | 2 +- metricproviders/graphite/api.go | 2 +- metricproviders/influxdb/influxdb.go | 2 +- metricproviders/influxdb/mock_test.go | 4 +- metricproviders/kayenta/kayenta.go | 4 +- metricproviders/kayenta/kayenta_test.go | 4 +- metricproviders/newrelic/newrelic.go | 2 +- metricproviders/newrelic/newrelic_test.go | 18 +-- metricproviders/plugin/rpc/rpc.go | 32 ++--- metricproviders/skywalking/mock_test.go | 4 +- metricproviders/skywalking/skywalking.go | 10 +- metricproviders/skywalking/skywalking_test.go | 12 +- metricproviders/webmetric/webmetric.go | 4 +- .../validation/validation_references.go | 2 +- .../cmd/create/create.go | 4 +- pkg/kubectl-argo-rollouts/cmd/lint/lint.go | 4 +- .../cmd/list/list_experiments.go | 2 +- .../cmd/list/rollloutinfo.go | 6 +- .../cmd/set/set_image.go | 4 +- pkg/kubectl-argo-rollouts/cmd/undo/undo.go | 8 +- .../viewcontroller/viewcontroller.go | 20 +-- rollout/canary_test.go | 20 +-- rollout/controller.go | 30 ++--- rollout/controller_test.go | 12 +- rollout/replicaset_test.go | 2 +- rollout/restart.go | 2 +- rollout/restart_test.go | 32 ++--- rollout/templateref.go | 18 +-- rollout/trafficrouting/apisix/apisix.go | 46 +++---- rollout/trafficrouting/apisix/apisix_test.go | 48 +++---- rollout/trafficrouting/apisix/mocks/apisix.go | 4 +- rollout/trafficrouting/appmesh/appmesh.go | 20 +-- .../trafficrouting/appmesh/appmesh_test.go | 30 ++--- .../trafficrouting/appmesh/resource_client.go | 2 +- rollout/trafficrouting/istio/controller.go | 22 ++-- .../trafficrouting/istio/controller_test.go | 8 +- rollout/trafficrouting/istio/istio.go | 118 +++++++++--------- rollout/trafficrouting/istio/istio_test.go | 54 ++++---- rollout/trafficrouting/istio/istio_types.go | 2 +- rollout/trafficrouting/plugin/rpc/rpc.go | 36 +++--- .../trafficrouting/traefik/mocks/traefik.go | 4 +- rollout/trafficrouting/traefik/traefik.go | 6 +- .../trafficrouting/traefik/traefik_test.go | 14 +-- rollout/trafficrouting_test.go | 2 +- server/server.go | 6 +- service/service.go | 12 +- service/service_test.go | 2 +- test/e2e/apisix_test.go | 11 +- test/e2e/appmesh_test.go | 4 +- test/e2e/functional_test.go | 4 +- test/fixtures/given.go | 2 +- test/fixtures/then.go | 2 +- test/fixtures/when.go | 6 +- test/util/util.go | 2 +- utils/analysis/factory.go | 10 +- utils/analysis/helpers.go | 4 +- utils/analysis/helpers_test.go | 2 +- utils/aws/aws.go | 4 +- utils/controller/controller.go | 12 +- utils/controller/controller_test.go | 34 ++--- utils/diff/diff.go | 2 +- utils/evaluate/evaluate.go | 22 ++-- utils/evaluate/evaluate_test.go | 14 +-- utils/json/json.go | 6 +- utils/json/json_test.go | 2 +- utils/log/log.go | 4 +- utils/record/record.go | 32 ++--- utils/record/record_test.go | 4 +- .../tolerantinformer/tolerantinformer_test.go | 2 +- utils/tolerantinformer/tollerantinformer.go | 4 +- utils/unstructured/unstructured.go | 12 +- 81 files changed, 529 insertions(+), 528 deletions(-) diff --git a/analysis/controller.go b/analysis/controller.go index 505e6f005c..b3519619ae 100644 --- a/analysis/controller.go +++ b/analysis/controller.go @@ -49,8 +49,8 @@ type Controller struct { newProvider func(logCtx log.Entry, metric v1alpha1.Metric) (metric.Provider, error) // used for unit testing - enqueueAnalysis func(obj interface{}) - enqueueAnalysisAfter func(obj interface{}, duration time.Duration) + enqueueAnalysis func(obj any) + enqueueAnalysisAfter func(obj any, duration time.Duration) // workqueue is a rate limited work queue. This is used to queue work to be // processed instead of performing it as soon as a change happens. This @@ -91,10 +91,10 @@ func NewController(cfg ControllerConfig) *Controller { resyncPeriod: cfg.ResyncPeriod, } - controller.enqueueAnalysis = func(obj interface{}) { + controller.enqueueAnalysis = func(obj any) { controllerutil.Enqueue(obj, cfg.AnalysisRunWorkQueue) } - controller.enqueueAnalysisAfter = func(obj interface{}, duration time.Duration) { + controller.enqueueAnalysisAfter = func(obj any, duration time.Duration) { controllerutil.EnqueueAfter(obj, duration, cfg.AnalysisRunWorkQueue) } @@ -105,13 +105,13 @@ func NewController(cfg ControllerConfig) *Controller { controller.newProvider = providerFactory.NewProvider cfg.JobInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { controller.enqueueIfCompleted(obj) }, - UpdateFunc: func(oldObj, newObj interface{}) { + UpdateFunc: func(oldObj, newObj any) { controller.enqueueIfCompleted(newObj) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { controller.enqueueIfCompleted(obj) }, }) @@ -120,10 +120,10 @@ func NewController(cfg ControllerConfig) *Controller { // Set up an event handler for when analysis resources change cfg.AnalysisRunInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAnalysis, - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { controller.enqueueAnalysis(new) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { controller.enqueueAnalysis(obj) if ar := unstructuredutil.ObjectToAnalysisRun(obj); ar != nil { logCtx := logutil.WithAnalysisRun(ar) @@ -186,7 +186,7 @@ func (c *Controller) syncHandler(ctx context.Context, key string) error { return c.persistAnalysisRunStatus(run, newRun.Status) } -func (c *Controller) enqueueIfCompleted(obj interface{}) { +func (c *Controller) enqueueIfCompleted(obj any) { job, ok := obj.(*batchv1.Job) if !ok { return diff --git a/analysis/controller_test.go b/analysis/controller_test.go index cde8ba853e..032f5cf74d 100644 --- a/analysis/controller_test.go +++ b/analysis/controller_test.go @@ -113,7 +113,7 @@ func (f *fixture) newController(resync resyncFunc) (*Controller, informers.Share Recorder: record.NewFakeEventRecorder(), }) - c.enqueueAnalysis = func(obj interface{}) { + c.enqueueAnalysis = func(obj any) { var key string var err error if key, err = cache.MetaNamespaceKeyFunc(obj); err != nil { @@ -127,7 +127,7 @@ func (f *fixture) newController(resync resyncFunc) (*Controller, informers.Share f.enqueuedObjects[key] = count c.analysisRunWorkQueue.Add(obj) } - c.enqueueAnalysisAfter = func(obj interface{}, duration time.Duration) { + c.enqueueAnalysisAfter = func(obj any, duration time.Duration) { c.enqueueAnalysis(obj) } f.provider = &mocks.Provider{} diff --git a/controller/metrics/metrics_test.go b/controller/metrics/metrics_test.go index 00700321fa..ced10b2442 100644 --- a/controller/metrics/metrics_test.go +++ b/controller/metrics/metrics_test.go @@ -54,7 +54,7 @@ func newFakeServerConfig(objs ...runtime.Object) ServerConfig { } } -func testHttpResponse(t *testing.T, handler http.Handler, expectedResponse string, testFunc func(t assert.TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) bool) { +func testHttpResponse(t *testing.T, handler http.Handler, expectedResponse string, testFunc func(t assert.TestingT, s any, contains any, msgAndArgs ...any) bool) { t.Helper() req, err := http.NewRequest("GET", "/metrics", nil) assert.NoError(t, err) diff --git a/experiments/controller.go b/experiments/controller.go index a42821aab0..3aa1519e46 100644 --- a/experiments/controller.go +++ b/experiments/controller.go @@ -63,8 +63,8 @@ type Controller struct { metricsServer *metrics.MetricsServer // used for unit testing - enqueueExperiment func(obj interface{}) - enqueueExperimentAfter func(obj interface{}, duration time.Duration) + enqueueExperiment func(obj any) + enqueueExperimentAfter func(obj any, duration time.Duration) // workqueue is a rate limited work queue. This is used to queue work to be // processed instead of performing it as soon as a change happens. This @@ -127,10 +127,10 @@ func NewController(cfg ControllerConfig) *Controller { resyncPeriod: cfg.ResyncPeriod, } - controller.enqueueExperiment = func(obj interface{}) { + controller.enqueueExperiment = func(obj any) { controllerutil.Enqueue(obj, cfg.ExperimentWorkQueue) } - controller.enqueueExperimentAfter = func(obj interface{}, duration time.Duration) { + controller.enqueueExperimentAfter = func(obj any, duration time.Duration) { controllerutil.EnqueueAfter(obj, duration, cfg.ExperimentWorkQueue) } @@ -138,20 +138,20 @@ func NewController(cfg ControllerConfig) *Controller { // Set up an event handler for when experiment resources change cfg.ExperimentsInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueExperiment, - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { controller.enqueueExperiment(new) }, DeleteFunc: controller.enqueueExperiment, }) cfg.ExperimentsInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { - enqueueRollout := func(obj interface{}) { + AddFunc: func(obj any) { + enqueueRollout := func(obj any) { controllerutil.Enqueue(obj, cfg.RolloutWorkQueue) } controllerutil.EnqueueParentObject(obj, register.RolloutKind, enqueueRollout) }, - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { oldAcc, err := meta.Accessor(old) if err != nil { return @@ -165,13 +165,13 @@ func NewController(cfg ControllerConfig) *Controller { // Two different versions of the same Replica will always have different RVs. return } - enqueueRollout := func(obj interface{}) { + enqueueRollout := func(obj any) { controllerutil.Enqueue(obj, cfg.RolloutWorkQueue) } controllerutil.EnqueueParentObject(new, register.RolloutKind, enqueueRollout) }, - DeleteFunc: func(obj interface{}) { - enqueueRollout := func(obj interface{}) { + DeleteFunc: func(obj any) { + enqueueRollout := func(obj any) { controllerutil.Enqueue(obj, cfg.RolloutWorkQueue) } controllerutil.EnqueueParentObject(obj, register.RolloutKind, enqueueRollout) @@ -184,10 +184,10 @@ func NewController(cfg ControllerConfig) *Controller { }) cfg.ReplicaSetInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { controllerutil.EnqueueParentObject(obj, register.ExperimentKind, controller.enqueueExperiment) }, - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { newRS := new.(*appsv1.ReplicaSet) oldRS := old.(*appsv1.ReplicaSet) if newRS.ResourceVersion == oldRS.ResourceVersion { @@ -204,19 +204,19 @@ func NewController(cfg ControllerConfig) *Controller { } controllerutil.EnqueueParentObject(new, register.ExperimentKind, controller.enqueueExperiment) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { controllerutil.EnqueueParentObject(obj, register.ExperimentKind, controller.enqueueExperiment) }, }) cfg.AnalysisRunInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { controller.enqueueIfCompleted(obj) }, - UpdateFunc: func(oldObj, newObj interface{}) { + UpdateFunc: func(oldObj, newObj any) { controller.enqueueIfCompleted(newObj) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { controller.enqueueIfCompleted(obj) }, }) @@ -346,7 +346,7 @@ func (ec *Controller) persistExperimentStatus(orig *v1alpha1.Experiment, newStat } // enqueueIfCompleted conditionally enqueues the AnalysisRun's Experiment if the run is complete -func (ec *Controller) enqueueIfCompleted(obj interface{}) { +func (ec *Controller) enqueueIfCompleted(obj any) { run := unstructuredutil.ObjectToAnalysisRun(obj) if run == nil { return diff --git a/experiments/controller_test.go b/experiments/controller_test.go index 1e7eb14f13..26587b6346 100644 --- a/experiments/controller_test.go +++ b/experiments/controller_test.go @@ -302,12 +302,12 @@ func generateRSName(ex *v1alpha1.Experiment, template v1alpha1.TemplateSpec) str } func calculatePatch(ex *v1alpha1.Experiment, patch string, templates []v1alpha1.TemplateStatus, condition *v1alpha1.ExperimentCondition) string { - patchMap := make(map[string]interface{}) + patchMap := make(map[string]any) err := json.Unmarshal([]byte(patch), &patchMap) if err != nil { panic(err) } - newStatus := patchMap["status"].(map[string]interface{}) + newStatus := patchMap["status"].(map[string]any) if templates != nil { newStatus["templateStatuses"] = templates patchMap["status"] = newStatus @@ -334,7 +334,7 @@ func calculatePatch(ex *v1alpha1.Experiment, patch string, templates []v1alpha1. newEx := &v1alpha1.Experiment{} json.Unmarshal(newBytes, newEx) - newPatch := make(map[string]interface{}) + newPatch := make(map[string]any) json.Unmarshal(patchBytes, &newPatch) newPatchBytes, _ := json.Marshal(newPatch) return string(newPatchBytes) @@ -380,7 +380,7 @@ func (f *fixture) newController(resync resyncFunc) (*Controller, informers.Share }) var enqueuedObjectsLock sync.Mutex - c.enqueueExperiment = func(obj interface{}) { + c.enqueueExperiment = func(obj any) { var key string var err error if key, err = cache.MetaNamespaceKeyFunc(obj); err != nil { @@ -396,7 +396,7 @@ func (f *fixture) newController(resync resyncFunc) (*Controller, informers.Share f.enqueuedObjects[key] = count c.experimentWorkqueue.Add(obj) } - c.enqueueExperimentAfter = func(obj interface{}, duration time.Duration) { + c.enqueueExperimentAfter = func(obj any, duration time.Duration) { c.enqueueExperiment(obj) } diff --git a/experiments/experiment.go b/experiments/experiment.go index 7327c5a8b6..e4f0f53ede 100644 --- a/experiments/experiment.go +++ b/experiments/experiment.go @@ -46,7 +46,7 @@ type experimentContext struct { replicaSetLister appslisters.ReplicaSetLister serviceLister v1.ServiceLister recorder record.EventRecorder - enqueueExperimentAfter func(obj interface{}, duration time.Duration) + enqueueExperimentAfter func(obj any, duration time.Duration) resyncPeriod time.Duration // calculated values during reconciliation @@ -70,7 +70,7 @@ func newExperimentContext( serviceLister v1.ServiceLister, recorder record.EventRecorder, resyncPeriod time.Duration, - enqueueExperimentAfter func(obj interface{}, duration time.Duration), + enqueueExperimentAfter func(obj any, duration time.Duration), ) *experimentContext { exCtx := experimentContext{ diff --git a/experiments/experiment_test.go b/experiments/experiment_test.go index 0853a3b361..e047082cee 100644 --- a/experiments/experiment_test.go +++ b/experiments/experiment_test.go @@ -62,7 +62,7 @@ func newTestContext(ex *v1alpha1.Experiment, objects ...runtime.Object) *experim serviceLister, record.NewFakeEventRecorder(), noResyncPeriodFunc(), - func(obj interface{}, duration time.Duration) {}, + func(obj any, duration time.Duration) {}, ) } @@ -302,7 +302,7 @@ func TestDontRequeueWithoutDuration(t *testing.T) { fakeClient := exCtx.kubeclientset.(*k8sfake.Clientset) fakeClient.Tracker().Add(rs1) enqueueCalled := false - exCtx.enqueueExperimentAfter = func(obj interface{}, duration time.Duration) { + exCtx.enqueueExperimentAfter = func(obj any, duration time.Duration) { enqueueCalled = true } newStatus := exCtx.reconcile() @@ -325,7 +325,7 @@ func TestRequeueAfterDuration(t *testing.T) { "bar": rs1, } enqueueCalled := false - exCtx.enqueueExperimentAfter = func(obj interface{}, duration time.Duration) { + exCtx.enqueueExperimentAfter = func(obj any, duration time.Duration) { enqueueCalled = true // ensures we are enqueued around ~20 seconds twentySeconds := time.Second * time.Duration(20) @@ -352,7 +352,7 @@ func TestRequeueAfterProgressDeadlineSeconds(t *testing.T) { "bar": rs1, } enqueueCalled := false - exCtx.enqueueExperimentAfter = func(obj interface{}, duration time.Duration) { + exCtx.enqueueExperimentAfter = func(obj any, duration time.Duration) { enqueueCalled = true // ensures we are enqueued around 10 minutes tenMinutes := time.Second * time.Duration(600) diff --git a/hack/gen-crd-spec/main.go b/hack/gen-crd-spec/main.go index 97156308a5..c879472a53 100644 --- a/hack/gen-crd-spec/main.go +++ b/hack/gen-crd-spec/main.go @@ -31,7 +31,7 @@ const metadataValidation = `properties: type: object type: object` -var preserveUnknownFields = map[string]interface{}{ +var preserveUnknownFields = map[string]any{ "x-kubernetes-preserve-unknown-fields": true, } @@ -43,7 +43,7 @@ var crdPaths = map[string]string{ "AnalysisRun": "manifests/crds/analysis-run-crd.yaml", } -func setValidationOverride(un *unstructured.Unstructured, fieldOverride map[string]interface{}, path string) { +func setValidationOverride(un *unstructured.Unstructured, fieldOverride map[string]any, path string) { // Prepare variables preSchemaPath := []string{"spec", "versions"} objVersions, _, _ := unstructured.NestedSlice(un.Object, preSchemaPath...) @@ -59,11 +59,11 @@ func setValidationOverride(un *unstructured.Unstructured, fieldOverride map[stri } // Loop over version's slice - var finalOverride []interface{} + var finalOverride []any for _, v := range objVersions { - unstructured.SetNestedMap(v.(map[string]interface{}), fieldOverride, schemaPath...) + unstructured.SetNestedMap(v.(map[string]any), fieldOverride, schemaPath...) - _, ok, err := unstructured.NestedFieldNoCopy(v.(map[string]interface{}), schemaPath...) + _, ok, err := unstructured.NestedFieldNoCopy(v.(map[string]any), schemaPath...) checkErr(err) if !ok { panic(fmt.Sprintf("%s not found for kind %s", schemaPath, crdKind(un))) @@ -153,7 +153,7 @@ func createMetadataValidation(un *unstructured.Unstructured) { switch kind { case "Rollout": - var roValidated []interface{} + var roValidated []any roPath := []string{ "template", "properties", @@ -161,12 +161,12 @@ func createMetadataValidation(un *unstructured.Unstructured) { } roPath = append(path, roPath...) for _, v := range objVersions { - unstructured.SetNestedMap(v.(map[string]interface{}), metadataValidationObj.Object, roPath...) + unstructured.SetNestedMap(v.(map[string]any), metadataValidationObj.Object, roPath...) roValidated = append(roValidated, v) } unstructured.SetNestedSlice(un.Object, roValidated, prePath...) case "Experiment": - var exValidated []interface{} + var exValidated []any exPath := []string{ "templates", "items", @@ -177,12 +177,12 @@ func createMetadataValidation(un *unstructured.Unstructured) { } exPath = append(path, exPath...) for _, v := range objVersions { - unstructured.SetNestedMap(v.(map[string]interface{}), metadataValidationObj.Object, exPath...) + unstructured.SetNestedMap(v.(map[string]any), metadataValidationObj.Object, exPath...) exValidated = append(exValidated, v) } unstructured.SetNestedSlice(un.Object, exValidated, prePath...) case "ClusterAnalysisTemplate", "AnalysisTemplate", "AnalysisRun": - var analysisValidated []interface{} + var analysisValidated []any analysisPath := []string{ "metrics", "items", @@ -196,12 +196,12 @@ func createMetadataValidation(un *unstructured.Unstructured) { analysisPathJobMetadata := append(analysisPath, "metadata") for _, v := range objVersions { - unstructured.SetNestedMap(v.(map[string]interface{}), metadataValidationObj.Object, analysisPathJobMetadata...) + unstructured.SetNestedMap(v.(map[string]any), metadataValidationObj.Object, analysisPathJobMetadata...) analysisValidated = append(analysisValidated, v) } unstructured.SetNestedSlice(un.Object, analysisValidated, prePath...) - var analysisJobValidated []interface{} + var analysisJobValidated []any analysisPathJobTemplateMetadata := []string{ "spec", "properties", @@ -211,7 +211,7 @@ func createMetadataValidation(un *unstructured.Unstructured) { } analysisPathJobTemplateMetadata = append(analysisPath, analysisPathJobTemplateMetadata...) for _, v := range objVersions { - unstructured.SetNestedMap(v.(map[string]interface{}), metadataValidationObj.Object, analysisPathJobTemplateMetadata...) + unstructured.SetNestedMap(v.(map[string]any), metadataValidationObj.Object, analysisPathJobTemplateMetadata...) analysisJobValidated = append(analysisJobValidated, v) } unstructured.SetNestedSlice(un.Object, analysisJobValidated, prePath...) @@ -326,7 +326,7 @@ var patchAnnotationKeys = map[string]bool{ // injectPatchAnnotations injects patch annotations from given schema definitions and drop properties that don't have // patch annotations injected -func injectPatchAnnotations(prop map[string]interface{}, propSchema spec.Schema, schemaDefinitions spec.Definitions) (bool, error) { +func injectPatchAnnotations(prop map[string]any, propSchema spec.Schema, schemaDefinitions spec.Definitions) (bool, error) { injected := false for k, v := range propSchema.Extensions { if patchAnnotationKeys[k] { @@ -349,13 +349,13 @@ func injectPatchAnnotations(prop map[string]interface{}, propSchema spec.Schema, propSchemas = schema.Properties } - childProps, ok := prop["properties"].(map[string]interface{}) + childProps, ok := prop["properties"].(map[string]any) if !ok { - childProps = map[string]interface{}{} + childProps = map[string]any{} } for k, v := range childProps { - childInjected, err := injectPatchAnnotations(v.(map[string]interface{}), propSchemas[k], schemaDefinitions) + childInjected, err := injectPatchAnnotations(v.(map[string]any), propSchemas[k], schemaDefinitions) if err != nil { return false, err } @@ -390,7 +390,7 @@ func generateKustomizeSchema(crds []*extensionsobj.CustomResourceDefinition, out schemaDefinitions[normalizeRef(k)] = v.Schema } - definitions := map[string]interface{}{} + definitions := map[string]any{} for _, crd := range crds { var version string var props map[string]extensionsobj.JSONSchemaProps @@ -406,7 +406,7 @@ func generateKustomizeSchema(crds []*extensionsobj.CustomResourceDefinition, out if err != nil { return err } - propsMap := map[string]interface{}{} + propsMap := map[string]any{} err = json.Unmarshal(data, &propsMap) if err != nil { return err @@ -414,7 +414,7 @@ func generateKustomizeSchema(crds []*extensionsobj.CustomResourceDefinition, out crdSchema := schemaDefinitions[normalizeRef(fmt.Sprintf("%s/%s.%s", rolloutsDefinitionsPrefix, version, crd.Spec.Names.Kind))] for k, p := range propsMap { - injected, err := injectPatchAnnotations(p.(map[string]interface{}), crdSchema.Properties[k], schemaDefinitions) + injected, err := injectPatchAnnotations(p.(map[string]any), crdSchema.Properties[k], schemaDefinitions) if err != nil { return err } @@ -426,7 +426,7 @@ func generateKustomizeSchema(crds []*extensionsobj.CustomResourceDefinition, out } definitionName := kubeopenapiutil.ToRESTFriendlyName(fmt.Sprintf("%s/%s.%s", crd.Spec.Group, version, crd.Spec.Names.Kind)) - definitions[definitionName] = map[string]interface{}{ + definitions[definitionName] = map[string]any{ "properties": propsMap, "x-kubernetes-group-version-kind": []map[string]string{{ "group": crd.Spec.Group, @@ -435,7 +435,7 @@ func generateKustomizeSchema(crds []*extensionsobj.CustomResourceDefinition, out }}, } } - data, err := json.MarshalIndent(map[string]interface{}{ + data, err := json.MarshalIndent(map[string]any{ "definitions": definitions, }, "", " ") if err != nil { diff --git a/hack/gen-docs/main.go b/hack/gen-docs/main.go index 4e29e355be..b00f7988e2 100644 --- a/hack/gen-docs/main.go +++ b/hack/gen-docs/main.go @@ -73,15 +73,15 @@ func updateMkDocsNav(parent string, child string, files []string) error { if e := yaml.Unmarshal(data, &un.Object); e != nil { return e } - nav := un.Object["nav"].([]interface{}) + nav := un.Object["nav"].([]any) navitem, _ := findNavItem(nav, parent) if navitem == nil { return fmt.Errorf("Can't find '%s' nav item in mkdoc.yml", parent) } - navitemmap := navitem.(map[interface{}]interface{}) - subnav := navitemmap[parent].([]interface{}) + navitemmap := navitem.(map[any]any) + subnav := navitemmap[parent].([]any) subnav = removeNavItem(subnav, child) - commands := make(map[string]interface{}) + commands := make(map[string]any) commands[child] = files navitemmap[parent] = append(subnav, commands) @@ -92,9 +92,9 @@ func updateMkDocsNav(parent string, child string, files []string) error { return os.WriteFile("mkdocs.yml", newmkdocs, 0644) } -func findNavItem(nav []interface{}, key string) (interface{}, int) { +func findNavItem(nav []any, key string) (any, int) { for i, item := range nav { - o, ismap := item.(map[interface{}]interface{}) + o, ismap := item.(map[any]any) if ismap { if _, ok := o[key]; ok { return o, i @@ -104,7 +104,7 @@ func findNavItem(nav []interface{}, key string) (interface{}, int) { return nil, -1 } -func removeNavItem(nav []interface{}, key string) []interface{} { +func removeNavItem(nav []any, key string) []any { _, i := findNavItem(nav, key) if i != -1 { nav = append(nav[:i], nav[i+1:]...) diff --git a/ingress/ingress.go b/ingress/ingress.go index 6c4059e476..8af5327891 100644 --- a/ingress/ingress.go +++ b/ingress/ingress.go @@ -51,7 +51,7 @@ type Controller struct { ingressWorkqueue workqueue.RateLimitingInterface metricServer *metrics.MetricsServer - enqueueRollout func(obj interface{}) + enqueueRollout func(obj any) albClasses []string nginxClasses []string } @@ -76,7 +76,7 @@ func NewController(cfg ControllerConfig) *Controller { } util.CheckErr(cfg.RolloutsInformer.Informer().AddIndexers(cache.Indexers{ - ingressIndexName: func(obj interface{}) ([]string, error) { + ingressIndexName: func(obj any) ([]string, error) { if ro := unstructuredutil.ObjectToRollout(obj); ro != nil { return ingressutil.GetRolloutIngressKeys(ro), nil } @@ -85,17 +85,17 @@ func NewController(cfg ControllerConfig) *Controller { })) cfg.IngressWrap.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { controllerutil.Enqueue(obj, cfg.IngressWorkQueue) }, - UpdateFunc: func(oldObj, newObj interface{}) { + UpdateFunc: func(oldObj, newObj any) { controllerutil.Enqueue(newObj, cfg.IngressWorkQueue) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { controllerutil.Enqueue(obj, cfg.IngressWorkQueue) }, }) - controller.enqueueRollout = func(obj interface{}) { + controller.enqueueRollout = func(obj any) { controllerutil.EnqueueRateLimited(obj, cfg.RolloutWorkQueue) } diff --git a/ingress/ingress_test.go b/ingress/ingress_test.go index 92ebcc09d4..be588dd51a 100644 --- a/ingress/ingress_test.go +++ b/ingress/ingress_test.go @@ -148,7 +148,7 @@ func underlyingControllerBuilder(t *testing.T, ing []*extensionsv1beta1.Ingress, }) enqueuedObjects := map[string]int{} var enqueuedObjectsLock sync.Mutex - c.enqueueRollout = func(obj interface{}) { + c.enqueueRollout = func(obj any) { var key string var err error if key, err = cache.MetaNamespaceKeyFunc(obj); err != nil { diff --git a/metricproviders/graphite/api.go b/metricproviders/graphite/api.go index 06833ac028..bd470de474 100644 --- a/metricproviders/graphite/api.go +++ b/metricproviders/graphite/api.go @@ -87,7 +87,7 @@ type dataPoint struct { } func (gdp *dataPoint) UnmarshalJSON(data []byte) error { - var v []interface{} + var v []any if err := json.Unmarshal(data, &v); err != nil { return err } diff --git a/metricproviders/influxdb/influxdb.go b/metricproviders/influxdb/influxdb.go index f67c8d5f94..4266d2e2f6 100644 --- a/metricproviders/influxdb/influxdb.go +++ b/metricproviders/influxdb/influxdb.go @@ -87,7 +87,7 @@ func (p *Provider) GarbageCollect(run *v1alpha1.AnalysisRun, metric v1alpha1.Met } func (p *Provider) processResponse(metric v1alpha1.Metric, result *influxapi.QueryTableResult) (string, v1alpha1.AnalysisPhase, error) { - var res []interface{} + var res []any if result == nil { return "", v1alpha1.AnalysisPhaseError, fmt.Errorf("no QueryTableResult returned from flux query") } diff --git a/metricproviders/influxdb/mock_test.go b/metricproviders/influxdb/mock_test.go index 3aff084802..558efa9a45 100644 --- a/metricproviders/influxdb/mock_test.go +++ b/metricproviders/influxdb/mock_test.go @@ -23,10 +23,10 @@ func (m mockAPI) QueryRaw(context.Context, string, *domain.Dialect) (string, err panic("Not used") } -func (m mockAPI) QueryRawWithParams(ctx context.Context, query string, dialect *domain.Dialect, params interface{}) (string, error) { +func (m mockAPI) QueryRawWithParams(ctx context.Context, query string, dialect *domain.Dialect, params any) (string, error) { panic("Not used") } -func (m mockAPI) QueryWithParams(ctx context.Context, query string, params interface{}) (*influxapi.QueryTableResult, error) { +func (m mockAPI) QueryWithParams(ctx context.Context, query string, params any) (*influxapi.QueryTableResult, error) { panic("Not used") } diff --git a/metricproviders/kayenta/kayenta.go b/metricproviders/kayenta/kayenta.go index a6b93f40e6..79f47c5f28 100644 --- a/metricproviders/kayenta/kayenta.go +++ b/metricproviders/kayenta/kayenta.go @@ -146,7 +146,7 @@ func (p *Provider) Run(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric) v1alph if err != nil { return metricutil.MarkMeasurementError(newMeasurement, err) } - var dat map[string]interface{} + var dat map[string]any if err := json.Unmarshal(data, &dat); err != nil { return metricutil.MarkMeasurementError(newMeasurement, err) } @@ -185,7 +185,7 @@ func (p *Provider) Resume(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric, mea return metricutil.MarkMeasurementError(measurement, err) } - patch := make(map[string]interface{}) + patch := make(map[string]any) err = json.Unmarshal(data, &patch) if err != nil { diff --git a/metricproviders/kayenta/kayenta_test.go b/metricproviders/kayenta/kayenta_test.go index abfed0f7c1..548f868bfb 100644 --- a/metricproviders/kayenta/kayenta_test.go +++ b/metricproviders/kayenta/kayenta_test.go @@ -157,12 +157,12 @@ func TestRunSuccessfully(t *testing.T) { if err != nil { panic(err) } - bodyI := map[string]interface{}{} + bodyI := map[string]any{} err = json.Unmarshal(body, &bodyI) if err != nil { panic(err) } - expectedBodyI := map[string]interface{}{} + expectedBodyI := map[string]any{} err = json.Unmarshal([]byte(expectedBody), &expectedBodyI) if err != nil { panic(err) diff --git a/metricproviders/newrelic/newrelic.go b/metricproviders/newrelic/newrelic.go index eca410b6e7..0c971e5c60 100644 --- a/metricproviders/newrelic/newrelic.go +++ b/metricproviders/newrelic/newrelic.go @@ -78,7 +78,7 @@ func (p *Provider) Run(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric) v1alph return newMeasurement } -func toJSONString(v interface{}) (string, error) { +func toJSONString(v any) (string, error) { b, err := json.Marshal(v) if err != nil { return "", err diff --git a/metricproviders/newrelic/newrelic_test.go b/metricproviders/newrelic/newrelic_test.go index b483d96872..8f49049815 100644 --- a/metricproviders/newrelic/newrelic_test.go +++ b/metricproviders/newrelic/newrelic_test.go @@ -31,7 +31,7 @@ func TestType(t *testing.T) { func TestRunSuccessfully(t *testing.T) { e := log.Entry{} mock := &mockAPI{ - response: []nrdb.NRDBResult{map[string]interface{}{"count": 10}}, + response: []nrdb.NRDBResult{map[string]any{"count": 10}}, } p := NewNewRelicProvider(mock, e) metric := v1alpha1.Metric{ @@ -58,9 +58,9 @@ func TestRunWithTimeseries(t *testing.T) { e := log.NewEntry(log.New()) mock := &mockAPI{ response: []nrdb.NRDBResult{ - map[string]interface{}{"count": 10}, - map[string]interface{}{"count": 20}, - map[string]interface{}{"count": 30}}, + map[string]any{"count": 10}, + map[string]any{"count": 20}, + map[string]any{"count": 30}}, } p := NewNewRelicProvider(mock, *e) metric := v1alpha1.Metric{ @@ -86,7 +86,7 @@ func TestRunWithTimeseries(t *testing.T) { func TestRunWithFacet(t *testing.T) { e := log.NewEntry(log.New()) mock := &mockAPI{ - response: []nrdb.NRDBResult{map[string]interface{}{"count": 10, "average.duration": 12.34}}, + response: []nrdb.NRDBResult{map[string]any{"count": 10, "average.duration": 12.34}}, } p := NewNewRelicProvider(mock, *e) metric := v1alpha1.Metric{ @@ -112,7 +112,7 @@ func TestRunWithFacet(t *testing.T) { func TestRunWithMultipleSelectTerms(t *testing.T) { e := log.NewEntry(log.New()) mock := &mockAPI{ - response: []nrdb.NRDBResult{map[string]interface{}{"count": 10}}, + response: []nrdb.NRDBResult{map[string]any{"count": 10}}, } p := NewNewRelicProvider(mock, *e) metric := v1alpha1.Metric{ @@ -139,7 +139,7 @@ func TestRunWithEmptyResult(t *testing.T) { e := log.NewEntry(log.New()) expectedErr := fmt.Errorf("no results returned from NRQL query") mock := &mockAPI{ - response: []nrdb.NRDBResult{make(map[string]interface{})}, + response: []nrdb.NRDBResult{make(map[string]any)}, } p := NewNewRelicProvider(mock, *e) metric := v1alpha1.Metric{ @@ -245,7 +245,7 @@ func TestRunWithInvalidJSON(t *testing.T) { } t.Run("with a single result map", func(t *testing.T) { mock := &mockAPI{ - response: []nrdb.NRDBResult{map[string]interface{}{"func": func() {}}}, + response: []nrdb.NRDBResult{map[string]any{"func": func() {}}}, } p := NewNewRelicProvider(mock, *e) measurement := p.Run(newAnalysisRun(), metric) @@ -258,7 +258,7 @@ func TestRunWithInvalidJSON(t *testing.T) { t.Run("with multiple results", func(t *testing.T) { // cover branch where results slice is longer than 1 mock := &mockAPI{ - response: []nrdb.NRDBResult{map[string]interface{}{"key": "value"}, map[string]interface{}{"func": func() {}}}, + response: []nrdb.NRDBResult{map[string]any{"key": "value"}, map[string]any{"func": func() {}}}, } p := NewNewRelicProvider(mock, *e) measurement := p.Run(newAnalysisRun(), metric) diff --git a/metricproviders/plugin/rpc/rpc.go b/metricproviders/plugin/rpc/rpc.go index 7f703b5ec9..a709693976 100644 --- a/metricproviders/plugin/rpc/rpc.go +++ b/metricproviders/plugin/rpc/rpc.go @@ -56,7 +56,7 @@ type MetricsPluginRPC struct{ client *rpc.Client } // server side function. func (g *MetricsPluginRPC) InitPlugin() types.RpcError { var resp types.RpcError - err := g.client.Call("Plugin.InitPlugin", new(interface{}), &resp) + err := g.client.Call("Plugin.InitPlugin", new(any), &resp) if err != nil { return types.RpcError{ErrorString: fmt.Sprintf("InitPlugin rpc call error: %s", err)} } @@ -66,7 +66,7 @@ func (g *MetricsPluginRPC) InitPlugin() types.RpcError { // Run is the client side function that is wrapped by a local provider this makes an rpc call to the server side function. func (g *MetricsPluginRPC) Run(analysisRun *v1alpha1.AnalysisRun, metric v1alpha1.Metric) v1alpha1.Measurement { var resp v1alpha1.Measurement - var args interface{} = RunArgs{ + var args any = RunArgs{ AnalysisRun: analysisRun, Metric: metric, } @@ -83,7 +83,7 @@ func (g *MetricsPluginRPC) Run(analysisRun *v1alpha1.AnalysisRun, metric v1alpha // Resume is the client side function that is wrapped by a local provider this makes an rpc call to the server side function. func (g *MetricsPluginRPC) Resume(analysisRun *v1alpha1.AnalysisRun, metric v1alpha1.Metric, measurement v1alpha1.Measurement) v1alpha1.Measurement { var resp v1alpha1.Measurement - var args interface{} = TerminateAndResumeArgs{ + var args any = TerminateAndResumeArgs{ AnalysisRun: analysisRun, Metric: metric, Measurement: measurement, @@ -101,7 +101,7 @@ func (g *MetricsPluginRPC) Resume(analysisRun *v1alpha1.AnalysisRun, metric v1al // Terminate is the client side function that is wrapped by a local provider this makes an rpc call to the server side function. func (g *MetricsPluginRPC) Terminate(analysisRun *v1alpha1.AnalysisRun, metric v1alpha1.Metric, measurement v1alpha1.Measurement) v1alpha1.Measurement { var resp v1alpha1.Measurement - var args interface{} = TerminateAndResumeArgs{ + var args any = TerminateAndResumeArgs{ AnalysisRun: analysisRun, Metric: metric, Measurement: measurement, @@ -119,7 +119,7 @@ func (g *MetricsPluginRPC) Terminate(analysisRun *v1alpha1.AnalysisRun, metric v // GarbageCollect is the client side function that is wrapped by a local provider this makes an rpc call to the server side function. func (g *MetricsPluginRPC) GarbageCollect(analysisRun *v1alpha1.AnalysisRun, metric v1alpha1.Metric, limit int) types.RpcError { var resp types.RpcError - var args interface{} = GarbageCollectArgs{ + var args any = GarbageCollectArgs{ AnalysisRun: analysisRun, Metric: metric, Limit: limit, @@ -134,7 +134,7 @@ func (g *MetricsPluginRPC) GarbageCollect(analysisRun *v1alpha1.AnalysisRun, met // Type is the client side function that is wrapped by a local provider this makes an rpc call to the server side function. func (g *MetricsPluginRPC) Type() string { var resp string - err := g.client.Call("Plugin.Type", new(interface{}), &resp) + err := g.client.Call("Plugin.Type", new(any), &resp) if err != nil { return fmt.Sprintf("Type rpc call error: %s", err) } @@ -144,7 +144,7 @@ func (g *MetricsPluginRPC) Type() string { // GetMetadata is the client side function that is wrapped by a local provider this makes an rpc call to the server side function. func (g *MetricsPluginRPC) GetMetadata(metric v1alpha1.Metric) map[string]string { var resp map[string]string - var args interface{} = GetMetadataArgs{ + var args any = GetMetadataArgs{ Metric: metric, } err := g.client.Call("Plugin.GetMetadata", &args, &resp) @@ -166,14 +166,14 @@ type MetricsRPCServer struct { // InitPlugin is the receiving end of the RPC call running in the plugin executable process (the server), and it calls the // implementation of the plugin. -func (s *MetricsRPCServer) InitPlugin(args interface{}, resp *types.RpcError) error { +func (s *MetricsRPCServer) InitPlugin(args any, resp *types.RpcError) error { *resp = s.Impl.InitPlugin() return nil } // Run is the receiving end of the RPC call running in the plugin executable process (the server), and it calls the // implementation of the plugin. -func (s *MetricsRPCServer) Run(args interface{}, resp *v1alpha1.Measurement) error { +func (s *MetricsRPCServer) Run(args any, resp *v1alpha1.Measurement) error { runArgs, ok := args.(*RunArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -184,7 +184,7 @@ func (s *MetricsRPCServer) Run(args interface{}, resp *v1alpha1.Measurement) err // Resume is the receiving end of the RPC call running in the plugin executable process (the server), and it calls the // implementation of the plugin. -func (s *MetricsRPCServer) Resume(args interface{}, resp *v1alpha1.Measurement) error { +func (s *MetricsRPCServer) Resume(args any, resp *v1alpha1.Measurement) error { resumeArgs, ok := args.(*TerminateAndResumeArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -195,7 +195,7 @@ func (s *MetricsRPCServer) Resume(args interface{}, resp *v1alpha1.Measurement) // Terminate is the receiving end of the RPC call running in the plugin executable process (the server), and it calls the // implementation of the plugin. -func (s *MetricsRPCServer) Terminate(args interface{}, resp *v1alpha1.Measurement) error { +func (s *MetricsRPCServer) Terminate(args any, resp *v1alpha1.Measurement) error { resumeArgs, ok := args.(*TerminateAndResumeArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -206,7 +206,7 @@ func (s *MetricsRPCServer) Terminate(args interface{}, resp *v1alpha1.Measuremen // GarbageCollect is the receiving end of the RPC call running in the plugin executable process (the server), and it calls the // implementation of the plugin. -func (s *MetricsRPCServer) GarbageCollect(args interface{}, resp *types.RpcError) error { +func (s *MetricsRPCServer) GarbageCollect(args any, resp *types.RpcError) error { gcArgs, ok := args.(*GarbageCollectArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -217,14 +217,14 @@ func (s *MetricsRPCServer) GarbageCollect(args interface{}, resp *types.RpcError // Type is the receiving end of the RPC call running in the plugin executable process (the server), and it calls the // implementation of the plugin. -func (s *MetricsRPCServer) Type(args interface{}, resp *string) error { +func (s *MetricsRPCServer) Type(args any, resp *string) error { *resp = s.Impl.Type() return nil } // GetMetadata is the receiving end of the RPC call running in the plugin executable process (the server), and it calls the // implementation of the plugin. -func (s *MetricsRPCServer) GetMetadata(args interface{}, resp *map[string]string) error { +func (s *MetricsRPCServer) GetMetadata(args any, resp *map[string]string) error { getMetadataArgs, ok := args.(*GetMetadataArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -248,10 +248,10 @@ type RpcMetricProviderPlugin struct { Impl MetricProviderPlugin } -func (p *RpcMetricProviderPlugin) Server(*plugin.MuxBroker) (interface{}, error) { +func (p *RpcMetricProviderPlugin) Server(*plugin.MuxBroker) (any, error) { return &MetricsRPCServer{Impl: p.Impl}, nil } -func (RpcMetricProviderPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error) { +func (RpcMetricProviderPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (any, error) { return &MetricsPluginRPC{client: c}, nil } diff --git a/metricproviders/skywalking/mock_test.go b/metricproviders/skywalking/mock_test.go index 70a5b67867..147b172294 100644 --- a/metricproviders/skywalking/mock_test.go +++ b/metricproviders/skywalking/mock_test.go @@ -2,10 +2,10 @@ package skywalking type mockAPI struct { err error - results interface{} + results any } -func (m mockAPI) Query(query string) (interface{}, error) { +func (m mockAPI) Query(query string) (any, error) { if m.err != nil { return m.results, m.err } diff --git a/metricproviders/skywalking/skywalking.go b/metricproviders/skywalking/skywalking.go index eb343b1bdd..4b352100f9 100644 --- a/metricproviders/skywalking/skywalking.go +++ b/metricproviders/skywalking/skywalking.go @@ -29,7 +29,7 @@ const ( ) type SkyWalkingClientAPI interface { - Query(query string) (interface{}, error) + Query(query string) (any, error) } type SkyWalkingClient struct { @@ -38,7 +38,7 @@ type SkyWalkingClient struct { } // Query executes a GraphQL query against the given SkyWalking backend -func (n SkyWalkingClient) Query(query string) (interface{}, error) { +func (n SkyWalkingClient) Query(query string) (any, error) { ctx, cancel := context.WithTimeout(context.Background(), defaultQueryTimeout) defer cancel() @@ -48,7 +48,7 @@ func (n SkyWalkingClient) Query(query string) (interface{}, error) { End: time.Now().Format("2006-01-02 1504"), Step: "MINUTE", }) - var results interface{} + var results any err := n.Run(ctx, req, &results) return results, err } @@ -82,7 +82,7 @@ func (p *Provider) Run(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric) v1alph return newMeasurement } -func toJSONString(v interface{}) (string, error) { +func toJSONString(v any) (string, error) { b, err := json.Marshal(v) if err != nil { return "", err @@ -90,7 +90,7 @@ func toJSONString(v interface{}) (string, error) { return string(b), nil } -func (p *Provider) processResponse(metric v1alpha1.Metric, result interface{}) (string, v1alpha1.AnalysisPhase, error) { +func (p *Provider) processResponse(metric v1alpha1.Metric, result any) (string, v1alpha1.AnalysisPhase, error) { if result == nil { return "", v1alpha1.AnalysisPhaseFailed, fmt.Errorf("no results returned from SkyWalking query") } diff --git a/metricproviders/skywalking/skywalking_test.go b/metricproviders/skywalking/skywalking_test.go index 47c1a60dc9..434def389c 100644 --- a/metricproviders/skywalking/skywalking_test.go +++ b/metricproviders/skywalking/skywalking_test.go @@ -25,7 +25,7 @@ func TestType(t *testing.T) { func TestRunSuccessfully(t *testing.T) { e := log.Entry{} mock := &mockAPI{ - results: map[string]interface{}{"count": 10}, + results: map[string]any{"count": 10}, } p := NewSkyWalkingProvider(mock, e) metric := v1alpha1.Metric{ @@ -51,10 +51,10 @@ func TestRunSuccessfully(t *testing.T) { func TestRunWithTimeseries(t *testing.T) { e := log.NewEntry(log.New()) mock := &mockAPI{ - results: []interface{}{ - map[string]interface{}{"count": 10}, - map[string]interface{}{"count": 20}, - map[string]interface{}{"count": 30}}, + results: []any{ + map[string]any{"count": 10}, + map[string]any{"count": 20}, + map[string]any{"count": 30}}, } p := NewSkyWalkingProvider(mock, *e) metric := v1alpha1.Metric{ @@ -107,7 +107,7 @@ func TestRunWithResolveArgsError(t *testing.T) { expectedErr := fmt.Errorf("failed to resolve {{args.var}}") mock := &mockAPI{ err: expectedErr, - results: map[string]interface{}{"A": "B"}, + results: map[string]any{"A": "B"}, } p := NewSkyWalkingProvider(mock, *e) metric := v1alpha1.Metric{ diff --git a/metricproviders/webmetric/webmetric.go b/metricproviders/webmetric/webmetric.go index e32531f92a..3ec345b90f 100644 --- a/metricproviders/webmetric/webmetric.go +++ b/metricproviders/webmetric/webmetric.go @@ -119,7 +119,7 @@ func (p *Provider) Run(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric) v1alph } func (p *Provider) parseResponse(metric v1alpha1.Metric, response *http.Response) (string, v1alpha1.AnalysisPhase, error) { - var data interface{} + var data any bodyBytes, err := io.ReadAll(response.Body) if err != nil { @@ -145,7 +145,7 @@ func (p *Provider) parseResponse(metric v1alpha1.Metric, response *http.Response return valString, status, err } -func getValue(fullResults [][]reflect.Value) (interface{}, string, error) { +func getValue(fullResults [][]reflect.Value) (any, string, error) { for _, results := range fullResults { for _, r := range results { val := r.Interface() diff --git a/pkg/apis/rollouts/validation/validation_references.go b/pkg/apis/rollouts/validation/validation_references.go index 85040c71c5..f546766b83 100644 --- a/pkg/apis/rollouts/validation/validation_references.go +++ b/pkg/apis/rollouts/validation/validation_references.go @@ -474,7 +474,7 @@ func ValidateAppMeshVirtualRouter(vrouter *unstructured.Unstructured) *field.Err } for idx, routeI := range allRoutesI { routeFldPath := routesFldPath.Index(idx) - route, ok := routeI.(map[string]interface{}) + route, ok := routeI.(map[string]any) if !ok { msg := fmt.Sprintf("Invalid route was found for AppMesh virtual-router %s at index %d", vrouter.GetName(), idx) return field.Invalid(routeFldPath, vrouter.GetName(), msg) diff --git a/pkg/kubectl-argo-rollouts/cmd/create/create.go b/pkg/kubectl-argo-rollouts/cmd/create/create.go index f5dccb4932..a6523d24f7 100644 --- a/pkg/kubectl-argo-rollouts/cmd/create/create.go +++ b/pkg/kubectl-argo-rollouts/cmd/create/create.go @@ -127,7 +127,7 @@ func isJSON(fileBytes []byte) bool { return false } -func unmarshal(fileBytes []byte, obj interface{}) error { +func unmarshal(fileBytes []byte, obj any) error { if isJSON(fileBytes) { decoder := json.NewDecoder(bytes.NewReader(fileBytes)) decoder.DisallowUnknownFields() @@ -143,7 +143,7 @@ func (c *CreateOptions) getNamespace(un unstructured.Unstructured) string { if md == nil { return ns } - metadata := md.(map[string]interface{}) + metadata := md.(map[string]any) if internalns, ok := metadata["namespace"]; ok { ns = internalns.(string) } diff --git a/pkg/kubectl-argo-rollouts/cmd/lint/lint.go b/pkg/kubectl-argo-rollouts/cmd/lint/lint.go index cf1b3cdb36..810abf2c8e 100644 --- a/pkg/kubectl-argo-rollouts/cmd/lint/lint.go +++ b/pkg/kubectl-argo-rollouts/cmd/lint/lint.go @@ -65,7 +65,7 @@ func NewCmdLint(o *options.ArgoRolloutsOptions) *cobra.Command { return cmd } -func unmarshal(fileBytes []byte, obj interface{}) error { +func unmarshal(fileBytes []byte, obj any) error { return yaml.UnmarshalStrict(fileBytes, &obj, yaml.DisallowUnknownFields) } @@ -81,7 +81,7 @@ func (l *LintOptions) lintResource(path string) error { decoder := goyaml.NewDecoder(bytes.NewReader(fileBytes)) for { - var value interface{} + var value any if err := decoder.Decode(&value); err != nil { if err != io.EOF { return err diff --git a/pkg/kubectl-argo-rollouts/cmd/list/list_experiments.go b/pkg/kubectl-argo-rollouts/cmd/list/list_experiments.go index 493a8aaa18..cb83a157fa 100644 --- a/pkg/kubectl-argo-rollouts/cmd/list/list_experiments.go +++ b/pkg/kubectl-argo-rollouts/cmd/list/list_experiments.go @@ -99,7 +99,7 @@ func (o *ListOptions) PrintExperimentTable(expList *v1alpha1.ExperimentList) err } } } - var cols []interface{} + var cols []any if o.allNamespaces { cols = append(cols, exp.Namespace) } diff --git a/pkg/kubectl-argo-rollouts/cmd/list/rollloutinfo.go b/pkg/kubectl-argo-rollouts/cmd/list/rollloutinfo.go index d015939f69..a797e35f1d 100644 --- a/pkg/kubectl-argo-rollouts/cmd/list/rollloutinfo.go +++ b/pkg/kubectl-argo-rollouts/cmd/list/rollloutinfo.go @@ -86,15 +86,15 @@ func (ri *rolloutInfo) key() infoKey { func (ri *rolloutInfo) String(timestamp, namespace bool) string { fmtString := columnFmtString - args := []interface{}{ri.name, ri.strategy, ri.status, ri.step, ri.setWeight, ri.readyCurrent, ri.desired, ri.upToDate, ri.available} + args := []any{ri.name, ri.strategy, ri.status, ri.step, ri.setWeight, ri.readyCurrent, ri.desired, ri.upToDate, ri.available} if namespace { fmtString = "%-9s\t" + fmtString - args = append([]interface{}{ri.namespace}, args...) + args = append([]any{ri.namespace}, args...) } if timestamp { fmtString = "%-20s\t" + fmtString timestampStr := timeutil.Now().UTC().Truncate(time.Second).Format("2006-01-02T15:04:05Z") - args = append([]interface{}{timestampStr}, args...) + args = append([]any{timestampStr}, args...) } return fmt.Sprintf(fmtString, args...) } diff --git a/pkg/kubectl-argo-rollouts/cmd/set/set_image.go b/pkg/kubectl-argo-rollouts/cmd/set/set_image.go index 45ed6faac9..1a5b5dce24 100644 --- a/pkg/kubectl-argo-rollouts/cmd/set/set_image.go +++ b/pkg/kubectl-argo-rollouts/cmd/set/set_image.go @@ -124,9 +124,9 @@ func newRolloutSetImage(orig *unstructured.Unstructured, container string, image if !ok { continue } - ctrList := ctrListIf.([]interface{}) + ctrList := ctrListIf.([]any) for _, ctrIf := range ctrList { - ctr := ctrIf.(map[string]interface{}) + ctr := ctrIf.(map[string]any) if name, _, _ := unstructured.NestedString(ctr, "name"); name == container || container == "*" { ctr["image"] = image containerFound = true diff --git a/pkg/kubectl-argo-rollouts/cmd/undo/undo.go b/pkg/kubectl-argo-rollouts/cmd/undo/undo.go index a282757b16..d3a78d15f2 100644 --- a/pkg/kubectl-argo-rollouts/cmd/undo/undo.go +++ b/pkg/kubectl-argo-rollouts/cmd/undo/undo.go @@ -176,8 +176,8 @@ func rolloutRevision(ro *unstructured.Unstructured, c kubernetes.Interface, toRe } func getRolloutPatch(podTemplate *corev1.PodTemplateSpec, annotations map[string]string) (types.PatchType, []byte, error) { - patch, err := json.Marshal([]interface{}{ - map[string]interface{}{ + patch, err := json.Marshal([]any{ + map[string]any{ "op": "replace", "path": "/spec/template", "value": podTemplate, @@ -235,12 +235,12 @@ func listReplicaSets(ro *unstructured.Unstructured, getRSList rsListFunc) ([]*ap return owned, nil } -func extractLabelSelector(v map[string]interface{}) (*metav1.LabelSelector, error) { +func extractLabelSelector(v map[string]any) (*metav1.LabelSelector, error) { labels, _, _ := unstructured.NestedStringMap(v, "spec", "selector", "matchLabels") items, _, _ := unstructured.NestedSlice(v, "spec", "selector", "matchExpressions") matchExpressions := []metav1.LabelSelectorRequirement{} for _, item := range items { - m, ok := item.(map[string]interface{}) + m, ok := item.(map[string]any) if !ok { return nil, fmt.Errorf("unable to retrieve matchExpressions for object, item %v is not a map", item) } diff --git a/pkg/kubectl-argo-rollouts/viewcontroller/viewcontroller.go b/pkg/kubectl-argo-rollouts/viewcontroller/viewcontroller.go index 157f148d5f..4aafb0a32a 100644 --- a/pkg/kubectl-argo-rollouts/viewcontroller/viewcontroller.go +++ b/pkg/kubectl-argo-rollouts/viewcontroller/viewcontroller.go @@ -45,9 +45,9 @@ type viewController struct { cacheSyncs []cache.InformerSynced workqueue workqueue.RateLimitingInterface - prevObj interface{} - getObj func() (interface{}, error) - callbacks []func(interface{}) + prevObj any + getObj func() (any, error) + callbacks []func(any) } type RolloutViewController struct { @@ -71,7 +71,7 @@ func NewRolloutViewController(namespace string, name string, kubeClient kubernet rvc := RolloutViewController{ viewController: vc, } - vc.getObj = func() (interface{}, error) { + vc.getObj = func() (any, error) { return rvc.GetRolloutInfo() } return &rvc @@ -82,7 +82,7 @@ func NewExperimentViewController(namespace string, name string, kubeClient kuber evc := ExperimentViewController{ viewController: vc, } - vc.getObj = func() (interface{}, error) { + vc.getObj = func() (any, error) { return evc.GetExperimentInfo() } return &evc @@ -114,13 +114,13 @@ func newViewController(namespace string, name string, kubeClient kubernetes.Inte ) enqueueRolloutHandlerFuncs := cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { controller.workqueue.Add(controller.name) }, - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { controller.workqueue.Add(controller.name) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { controller.workqueue.Add(controller.name) }, } @@ -215,7 +215,7 @@ func (c *RolloutViewController) GetRolloutInfo() (*rollout.RolloutInfo, error) { } func (c *RolloutViewController) RegisterCallback(callback RolloutInfoCallback) { - cb := func(i interface{}) { + cb := func(i any) { callback(i.(*rollout.RolloutInfo)) } c.callbacks = append(c.callbacks, cb) @@ -243,7 +243,7 @@ func (c *ExperimentViewController) GetExperimentInfo() (*rollout.ExperimentInfo, } func (c *ExperimentViewController) RegisterCallback(callback ExperimentInfoCallback) { - cb := func(i interface{}) { + cb := func(i any) { callback(i.(*rollout.ExperimentInfo)) } c.callbacks = append(c.callbacks, cb) diff --git a/rollout/canary_test.go b/rollout/canary_test.go index 9f66cf1078..e3bffff2dd 100644 --- a/rollout/canary_test.go +++ b/rollout/canary_test.go @@ -1467,7 +1467,7 @@ func TestCanaryRolloutWithInvalidCanaryServiceName(t *testing.T) { patchIndex := f.expectPatchRolloutAction(rollout) f.run(getKey(rollout, t)) - patch := make(map[string]interface{}) + patch := make(map[string]any) patchData := f.getPatchedRollout(patchIndex) err := json.Unmarshal([]byte(patchData), &patch) assert.NoError(t, err) @@ -1477,7 +1477,7 @@ func TestCanaryRolloutWithInvalidCanaryServiceName(t *testing.T) { assert.True(t, ok) assert.Len(t, c, 2) - condition, ok := c[1].(map[string]interface{}) + condition, ok := c[1].(map[string]any) assert.True(t, ok) assert.Equal(t, conditions.InvalidSpecReason, condition["reason"]) assert.Equal(t, "The Rollout \"foo\" is invalid: spec.strategy.canary.canaryService: Invalid value: \"invalid-canary\": service \"invalid-canary\" not found", condition["message"]) @@ -1519,7 +1519,7 @@ func TestCanaryRolloutWithInvalidStableServiceName(t *testing.T) { patchIndex := f.expectPatchRolloutAction(rollout) f.run(getKey(rollout, t)) - patch := make(map[string]interface{}) + patch := make(map[string]any) patchData := f.getPatchedRollout(patchIndex) err := json.Unmarshal([]byte(patchData), &patch) assert.NoError(t, err) @@ -1529,7 +1529,7 @@ func TestCanaryRolloutWithInvalidStableServiceName(t *testing.T) { assert.True(t, ok) assert.Len(t, c, 2) - condition, ok := c[1].(map[string]interface{}) + condition, ok := c[1].(map[string]any) assert.True(t, ok) assert.Equal(t, conditions.InvalidSpecReason, condition["reason"]) assert.Equal(t, "The Rollout \"foo\" is invalid: spec.strategy.canary.stableService: Invalid value: \"invalid-stable\": service \"invalid-stable\" not found", condition["message"]) @@ -1570,7 +1570,7 @@ func TestCanaryRolloutWithInvalidPingServiceName(t *testing.T) { patchIndex := f.expectPatchRolloutAction(r) f.run(getKey(r, t)) - patch := make(map[string]interface{}) + patch := make(map[string]any) patchData := f.getPatchedRollout(patchIndex) err := json.Unmarshal([]byte(patchData), &patch) assert.NoError(t, err) @@ -1580,7 +1580,7 @@ func TestCanaryRolloutWithInvalidPingServiceName(t *testing.T) { assert.True(t, ok) assert.Len(t, c, 2) - condition, ok := c[1].(map[string]interface{}) + condition, ok := c[1].(map[string]any) assert.True(t, ok) assert.Equal(t, conditions.InvalidSpecReason, condition["reason"]) assert.Equal(t, "The Rollout \"foo\" is invalid: spec.strategy.canary.pingPong.pingService: Invalid value: \"ping-service\": service \"ping-service\" not found", condition["message"]) @@ -1602,7 +1602,7 @@ func TestCanaryRolloutWithInvalidPongServiceName(t *testing.T) { patchIndex := f.expectPatchRolloutAction(r) f.run(getKey(r, t)) - patch := make(map[string]interface{}) + patch := make(map[string]any) patchData := f.getPatchedRollout(patchIndex) err := json.Unmarshal([]byte(patchData), &patch) assert.NoError(t, err) @@ -1612,7 +1612,7 @@ func TestCanaryRolloutWithInvalidPongServiceName(t *testing.T) { assert.True(t, ok) assert.Len(t, c, 2) - condition, ok := c[1].(map[string]interface{}) + condition, ok := c[1].(map[string]any) assert.True(t, ok) assert.Equal(t, conditions.InvalidSpecReason, condition["reason"]) assert.Equal(t, "The Rollout \"foo\" is invalid: spec.strategy.canary.pingPong.pongService: Invalid value: \"pong-service\": service \"pong-service\" not found", condition["message"]) @@ -1698,11 +1698,11 @@ func TestResumeRolloutAfterPauseDuration(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - var patchObj map[string]interface{} + var patchObj map[string]any err := json.Unmarshal([]byte(patch), &patchObj) assert.NoError(t, err) - status := patchObj["status"].(map[string]interface{}) + status := patchObj["status"].(map[string]any) assert.Equal(t, float64(2), status["currentStepIndex"]) controllerPause, ok := status["controllerPause"] assert.True(t, ok) diff --git a/rollout/controller.go b/rollout/controller.go index b5c51914ae..5824512271 100644 --- a/rollout/controller.go +++ b/rollout/controller.go @@ -144,8 +144,8 @@ type reconcilerBase struct { podRestarter RolloutPodRestarter // used for unit testing - enqueueRollout func(obj interface{}) //nolint:structcheck - enqueueRolloutAfter func(obj interface{}, duration time.Duration) //nolint:structcheck + enqueueRollout func(obj any) //nolint:structcheck + enqueueRolloutAfter func(obj any, duration time.Duration) //nolint:structcheck newTrafficRoutingReconciler func(roCtx *rolloutContext) ([]trafficrouting.TrafficRoutingReconciler, error) //nolint:structcheck // recorder is an event recorder for recording Event resources to the Kubernetes API. @@ -171,7 +171,7 @@ func NewController(cfg ControllerConfig) *Controller { podRestarter := RolloutPodRestarter{ client: cfg.KubeClientSet, resyncPeriod: cfg.ResyncPeriod, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { controllerutil.EnqueueAfter(obj, duration, cfg.RolloutWorkQueue) }, } @@ -208,10 +208,10 @@ func NewController(cfg ControllerConfig) *Controller { ingressWorkqueue: cfg.IngressWorkQueue, metricsServer: cfg.MetricsServer, } - controller.enqueueRollout = func(obj interface{}) { + controller.enqueueRollout = func(obj any) { controllerutil.EnqueueRateLimited(obj, cfg.RolloutWorkQueue) } - controller.enqueueRolloutAfter = func(obj interface{}, duration time.Duration) { + controller.enqueueRolloutAfter = func(obj any, duration time.Duration) { controllerutil.EnqueueAfter(obj, duration, cfg.RolloutWorkQueue) } @@ -228,7 +228,7 @@ func NewController(cfg ControllerConfig) *Controller { log.Info("Setting up event handlers") // Set up an event handler for when rollout resources change cfg.RolloutsInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { controller.enqueueRollout(obj) ro := unstructuredutil.ObjectToRollout(obj) if ro != nil { @@ -242,7 +242,7 @@ func NewController(cfg ControllerConfig) *Controller { } } }, - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { oldRollout := unstructuredutil.ObjectToRollout(old) newRollout := unstructuredutil.ObjectToRollout(new) if oldRollout != nil && newRollout != nil { @@ -258,7 +258,7 @@ func NewController(cfg ControllerConfig) *Controller { } controller.enqueueRollout(new) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { if ro := unstructuredutil.ObjectToRollout(obj); ro != nil { logCtx := logutil.WithRollout(ro) logCtx.Info("rollout deleted") @@ -277,10 +277,10 @@ func NewController(cfg ControllerConfig) *Controller { }) cfg.ReplicaSetInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { controllerutil.EnqueueParentObject(obj, register.RolloutKind, controller.enqueueRollout) }, - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { newRS := new.(*appsv1.ReplicaSet) oldRS := old.(*appsv1.ReplicaSet) if newRS.ResourceVersion == oldRS.ResourceVersion { @@ -290,16 +290,16 @@ func NewController(cfg ControllerConfig) *Controller { } controllerutil.EnqueueParentObject(new, register.RolloutKind, controller.enqueueRollout) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { controllerutil.EnqueueParentObject(obj, register.RolloutKind, controller.enqueueRollout) }, }) cfg.AnalysisRunInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { controllerutil.EnqueueParentObject(obj, register.RolloutKind, controller.enqueueRollout) }, - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { oldAR := unstructuredutil.ObjectToAnalysisRun(old) newAR := unstructuredutil.ObjectToAnalysisRun(new) if oldAR == nil || newAR == nil { @@ -311,7 +311,7 @@ func NewController(cfg ControllerConfig) *Controller { } controllerutil.EnqueueParentObject(new, register.RolloutKind, controller.enqueueRollout) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { controllerutil.EnqueueParentObject(obj, register.RolloutKind, controller.enqueueRollout) }, }) @@ -884,7 +884,7 @@ func (c *rolloutContext) getReferencedALBIngresses(canary *v1alpha1.CanaryStrate return &ingresses, nil } -func handleCacheError(name string, childFields []string, value interface{}, err error) (*[]ingressutil.Ingress, error) { +func handleCacheError(name string, childFields []string, value any, err error) (*[]ingressutil.Ingress, error) { if k8serrors.IsNotFound(err) { fldPath := field.NewPath("spec", "strategy", "canary", "trafficRouting") return nil, field.Invalid(fldPath.Child(name, childFields...), value, err.Error()) diff --git a/rollout/controller_test.go b/rollout/controller_test.go index d2c78d70c1..d37cdc24cd 100644 --- a/rollout/controller_test.go +++ b/rollout/controller_test.go @@ -494,12 +494,12 @@ func calculatePatch(ro *v1alpha1.Rollout, patch string) string { json.Unmarshal(newBytes, newRO) newObservedGen := strconv.Itoa(int(newRO.Generation)) - newPatch := make(map[string]interface{}) + newPatch := make(map[string]any) err = json.Unmarshal([]byte(patch), &newPatch) if err != nil { panic(err) } - newStatus := newPatch["status"].(map[string]interface{}) + newStatus := newPatch["status"].(map[string]any) newStatus["observedGeneration"] = newObservedGen newPatch["status"] = newStatus newPatchBytes, _ := json.Marshal(newPatch) @@ -507,7 +507,7 @@ func calculatePatch(ro *v1alpha1.Rollout, patch string) string { } func cleanPatch(expectedPatch string) string { - patch := make(map[string]interface{}) + patch := make(map[string]any) err := json.Unmarshal([]byte(expectedPatch), &patch) if err != nil { panic(err) @@ -599,7 +599,7 @@ func (f *fixture) newController(resync resyncFunc) (*Controller, informers.Share }) var enqueuedObjectsLock sync.Mutex - c.enqueueRollout = func(obj interface{}) { + c.enqueueRollout = func(obj any) { var key string var err error if key, err = cache.MetaNamespaceKeyFunc(obj); err != nil { @@ -615,7 +615,7 @@ func (f *fixture) newController(resync resyncFunc) (*Controller, informers.Share f.enqueuedObjects[key] = count c.rolloutWorkqueue.Add(obj) } - c.enqueueRolloutAfter = func(obj interface{}, duration time.Duration) { + c.enqueueRolloutAfter = func(obj any, duration time.Duration) { c.enqueueRollout(obj) } c.newTrafficRoutingReconciler = func(roCtx *rolloutContext) ([]trafficrouting.TrafficRoutingReconciler, error) { @@ -1078,7 +1078,7 @@ func (f *fixture) getPatchedRolloutWithoutConditions(index int) string { if !ok { f.t.Fatalf("Expected Patch action, not %s", action.GetVerb()) } - ro := make(map[string]interface{}) + ro := make(map[string]any) err := json.Unmarshal(patchAction.GetPatch(), &ro) if err != nil { f.t.Fatalf("Unable to unmarshal Patch") diff --git a/rollout/replicaset_test.go b/rollout/replicaset_test.go index b1588ff4ce..26b05b5b54 100644 --- a/rollout/replicaset_test.go +++ b/rollout/replicaset_test.go @@ -210,7 +210,7 @@ func TestReconcileNewReplicaSet(t *testing.T) { rollout: rollout, }, } - roCtx.enqueueRolloutAfter = func(obj interface{}, duration time.Duration) {} + roCtx.enqueueRolloutAfter = func(obj any, duration time.Duration) {} if test.abortScaleDownDelaySeconds > 0 { rollout.Status.Abort = true rollout.Spec.Strategy = v1alpha1.RolloutStrategy{ diff --git a/rollout/restart.go b/rollout/restart.go index a8361bf24f..95f9a97076 100644 --- a/rollout/restart.go +++ b/rollout/restart.go @@ -36,7 +36,7 @@ const ( type RolloutPodRestarter struct { client kubernetes.Interface resyncPeriod time.Duration - enqueueAfter func(obj interface{}, duration time.Duration) + enqueueAfter func(obj any, duration time.Duration) } // checkEnqueueRollout enqueues a Rollout if the Rollout's restartedAt is within the next resync diff --git a/rollout/restart_test.go b/rollout/restart_test.go index 84374a37a4..a6a20b4188 100644 --- a/rollout/restart_test.go +++ b/rollout/restart_test.go @@ -94,7 +94,7 @@ func TestRestartCheckEnqueueRollout(t *testing.T) { log: logrus.WithField("", ""), } p := RolloutPodRestarter{ - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { assert.Fail(t, "Should not enqueue rollout") }, } @@ -108,7 +108,7 @@ func TestRestartCheckEnqueueRollout(t *testing.T) { } p := RolloutPodRestarter{ resyncPeriod: 10 * time.Minute, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { assert.Fail(t, "Should not enqueue rollout") }, } @@ -123,7 +123,7 @@ func TestRestartCheckEnqueueRollout(t *testing.T) { } p := RolloutPodRestarter{ resyncPeriod: 10 * time.Minute, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { enqueued = true }, } @@ -139,7 +139,7 @@ func TestRestartCheckEnqueueRollout(t *testing.T) { } p := RolloutPodRestarter{ resyncPeriod: 2 * time.Minute, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { enqueued = true }, } @@ -182,7 +182,7 @@ func TestRestartReconcile(t *testing.T) { r := RolloutPodRestarter{ client: client, resyncPeriod: 2 * time.Minute, - enqueueAfter: func(obj interface{}, duration time.Duration) {}, + enqueueAfter: func(obj any, duration time.Duration) {}, } err := r.Reconcile(roCtx) assert.Nil(t, err) @@ -203,7 +203,7 @@ func TestRestartReconcile(t *testing.T) { }) r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) {}, + enqueueAfter: func(obj any, duration time.Duration) {}, } err := r.Reconcile(roCtx) assert.Errorf(t, err, expectedErrMsg) @@ -217,7 +217,7 @@ func TestRestartReconcile(t *testing.T) { } r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) {}, + enqueueAfter: func(obj any, duration time.Duration) {}, } err := r.Reconcile(roCtx) assert.Nil(t, err) @@ -235,7 +235,7 @@ func TestRestartReconcile(t *testing.T) { } r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) {}, + enqueueAfter: func(obj any, duration time.Duration) {}, } err := r.Reconcile(roCtx) assert.Nil(t, err) @@ -252,7 +252,7 @@ func TestRestartReconcile(t *testing.T) { } r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) {}, + enqueueAfter: func(obj any, duration time.Duration) {}, } err := r.Reconcile(roCtx) assert.Nil(t, err) @@ -469,7 +469,7 @@ func TestRestartMaxUnavailable(t *testing.T) { enqueued := false r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { enqueued = true }, } @@ -497,7 +497,7 @@ func TestRestartMaxUnavailable(t *testing.T) { enqueued := false r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { enqueued = true }, } @@ -525,7 +525,7 @@ func TestRestartMaxUnavailable(t *testing.T) { enqueued := false r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { enqueued = true }, } @@ -558,7 +558,7 @@ func TestRestartMaxUnavailable(t *testing.T) { enqueued := false r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { enqueued = true }, } @@ -592,7 +592,7 @@ func TestRestartMaxUnavailable(t *testing.T) { enqueued := false r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { enqueued = true }, } @@ -618,7 +618,7 @@ func TestRestartMaxUnavailable(t *testing.T) { enqueued := false r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { enqueued = true }, } @@ -650,7 +650,7 @@ func TestRestartRespectPodDisruptionBudget(t *testing.T) { enqueueCalled := false r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { enqueueCalled = true }, } diff --git a/rollout/templateref.go b/rollout/templateref.go index a8faf92b8b..15dab6a27d 100644 --- a/rollout/templateref.go +++ b/rollout/templateref.go @@ -75,7 +75,7 @@ func NewInformerBasedWorkloadRefResolver( ) *informerBasedTemplateResolver { ctx, cancelContext := context.WithCancel(context.TODO()) err := rolloutsInformer.AddIndexers(cache.Indexers{ - templateRefIndexName: func(obj interface{}) ([]string, error) { + templateRefIndexName: func(obj any) ([]string, error) { if ro := unstructuredutil.ObjectToRollout(obj); ro != nil && ro.Spec.WorkloadRef != nil { return []string{refKey(*ro.Spec.WorkloadRef, ro.Namespace)}, nil } @@ -115,7 +115,7 @@ func (r *informerBasedTemplateResolver) Stop() { r.cancelContext = cancelContext } -func remarshalMap(objMap map[string]interface{}, res interface{}) error { +func remarshalMap(objMap map[string]any, res any) error { data, err := json.Marshal(objMap) if err != nil { return err @@ -210,13 +210,13 @@ func (r *informerBasedTemplateResolver) newInformerForGVK(gvk schema.GroupVersio cache.Indexers{}, nil) informer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { r.updateRolloutsReferenceAnnotation(obj, gvk) }, - UpdateFunc: func(oldObj, newObj interface{}) { + UpdateFunc: func(oldObj, newObj any) { r.updateRolloutsReferenceAnnotation(newObj, gvk) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { r.updateRolloutsReferenceAnnotation(obj, gvk) }, }) @@ -225,7 +225,7 @@ func (r *informerBasedTemplateResolver) newInformerForGVK(gvk schema.GroupVersio } // updateRolloutsReferenceAnnotation update the annotation of all rollouts referenced by given object -func (r *informerBasedTemplateResolver) updateRolloutsReferenceAnnotation(obj interface{}, gvk schema.GroupVersionKind) { +func (r *informerBasedTemplateResolver) updateRolloutsReferenceAnnotation(obj any, gvk schema.GroupVersionKind) { workloadMeta, err := meta.Accessor(obj) if err != nil { return @@ -247,9 +247,9 @@ func (r *informerBasedTemplateResolver) updateRolloutsReferenceAnnotation(obj in updated := annotations.SetRolloutWorkloadRefGeneration(ro, generation) if updated { - patch := map[string]interface{}{ - "metadata": map[string]interface{}{ - "annotations": map[string]interface{}{ + patch := map[string]any{ + "metadata": map[string]any{ + "annotations": map[string]any{ annotations.WorkloadGenerationAnnotation: ro.Annotations[annotations.WorkloadGenerationAnnotation], }, }, diff --git a/rollout/trafficrouting/apisix/apisix.go b/rollout/trafficrouting/apisix/apisix.go index 1147721a39..6269cc698e 100644 --- a/rollout/trafficrouting/apisix/apisix.go +++ b/rollout/trafficrouting/apisix/apisix.go @@ -91,7 +91,7 @@ func (r *Reconciler) SetWeight(desiredWeight int32, additionalDestinations ...v1 return err } -func (r *Reconciler) processSetWeightRoutes(desiredWeight int32, apisixRoute *unstructured.Unstructured, rollout *v1alpha1.Rollout, apisixRouteName string) ([]interface{}, error) { +func (r *Reconciler) processSetWeightRoutes(desiredWeight int32, apisixRoute *unstructured.Unstructured, rollout *v1alpha1.Rollout, apisixRouteName string) ([]any, error) { httpRoutes, isFound, err := unstructured.NestedSlice(apisixRoute.Object, "spec", "http") if err != nil { return nil, err @@ -129,9 +129,9 @@ func (r *Reconciler) processSetWeightRoutes(desiredWeight int32, apisixRoute *un return httpRoutes, nil } -func GetHttpRoute(routes []interface{}, ref string) (interface{}, error) { +func GetHttpRoute(routes []any, ref string) (any, error) { for _, route := range routes { - typedRoute, ok := route.(map[string]interface{}) + typedRoute, ok := route.(map[string]any) if !ok { return nil, errors.New(failedToTypeAssertion) } @@ -151,8 +151,8 @@ func GetHttpRoute(routes []interface{}, ref string) (interface{}, error) { return nil, errors.New(fmt.Sprintf("Apisix http route rule %s not found", ref)) } -func GetBackends(httpRoute interface{}) ([]interface{}, error) { - typedHttpRoute, ok := httpRoute.(map[string]interface{}) +func GetBackends(httpRoute any) ([]any, error) { + typedHttpRoute, ok := httpRoute.(map[string]any) if !ok { return nil, errors.New(failedToTypeAssertion) } @@ -160,17 +160,17 @@ func GetBackends(httpRoute interface{}) ([]interface{}, error) { if !ok { return nil, errors.New("Apisix http route backends not found") } - backends, ok := rawBackends.([]interface{}) + backends, ok := rawBackends.([]any) if !ok { return nil, errors.New(fmt.Sprintf("%s backends", failedToTypeAssertion)) } return backends, nil } -func setBackendWeight(backendName string, backends []interface{}, weight int64) error { +func setBackendWeight(backendName string, backends []any, weight int64) error { found := false for _, backend := range backends { - typedBackend, ok := backend.(map[string]interface{}) + typedBackend, ok := backend.(map[string]any) if !ok { return errors.New(fmt.Sprintf("%s backends", failedToTypeAssertion)) } @@ -323,14 +323,14 @@ func (r *Reconciler) makeSetHeaderRoute(ctx context.Context, headerRouting *v1al return setHeaderApisixRoute, isNew, nil } -func removeBackend(route interface{}, backendName string, backends []interface{}) error { - typedRoute, ok := route.(map[string]interface{}) +func removeBackend(route any, backendName string, backends []any) error { + typedRoute, ok := route.(map[string]any) if !ok { return errors.New("Failed type assertion for Apisix http route") } - result := []interface{}{} + result := []any{} for _, backend := range backends { - typedBackend, ok := backend.(map[string]interface{}) + typedBackend, ok := backend.(map[string]any) if !ok { return errors.New("Failed type assertion for Apisix http route backend") } @@ -348,8 +348,8 @@ func removeBackend(route interface{}, backendName string, backends []interface{} return unstructured.SetNestedSlice(typedRoute, result, "backends") } -func processRulePriority(route interface{}) error { - typedRoute, ok := route.(map[string]interface{}) +func processRulePriority(route any) error { + typedRoute, ok := route.(map[string]any) if !ok { return errors.New("Failed type assertion for Apisix http route") } @@ -366,40 +366,40 @@ func processRulePriority(route interface{}) error { return nil } -func setApisixRuleMatch(route interface{}, headerRouting *v1alpha1.SetHeaderRoute) error { - typedRoute, ok := route.(map[string]interface{}) +func setApisixRuleMatch(route any, headerRouting *v1alpha1.SetHeaderRoute) error { + typedRoute, ok := route.(map[string]any) if !ok { return errors.New("Failed type assertion for Apisix http route") } - exprs := []interface{}{} + exprs := []any{} for _, match := range headerRouting.Match { exprs = append(exprs, apisixExprs(match.HeaderName, match.HeaderValue.Exact, match.HeaderValue.Regex, match.HeaderValue.Prefix)...) } return unstructured.SetNestedSlice(typedRoute, exprs, "match", "exprs") } -func apisixExprs(header, exact, regex, prefix string) []interface{} { - subject := map[string]interface{}{ +func apisixExprs(header, exact, regex, prefix string) []any { + subject := map[string]any{ "scope": "Header", "name": header, } - exprs := []interface{}{} + exprs := []any{} if exact != "" { - exprs = append(exprs, map[string]interface{}{ + exprs = append(exprs, map[string]any{ "subject": subject, "op": "Equal", "value": exact, }) } if regex != "" { - exprs = append(exprs, map[string]interface{}{ + exprs = append(exprs, map[string]any{ "subject": subject, "op": "RegexMatch", "value": regex, }) } if prefix != "" { - exprs = append(exprs, map[string]interface{}{ + exprs = append(exprs, map[string]any{ "subject": subject, "op": "RegexMatch", "value": fmt.Sprintf("^%s.*", prefix), diff --git a/rollout/trafficrouting/apisix/apisix_test.go b/rollout/trafficrouting/apisix/apisix_test.go index 9fcf4ff394..823e3bfb10 100644 --- a/rollout/trafficrouting/apisix/apisix_test.go +++ b/rollout/trafficrouting/apisix/apisix_test.go @@ -172,7 +172,7 @@ func TestSetWeight(t *testing.T) { backends, err := GetBackends(apisixHttpRouteObj) assert.NoError(t, err) for _, backend := range backends { - typedBackend, ok := backend.(map[string]interface{}) + typedBackend, ok := backend.(map[string]any) assert.Equal(t, ok, true) nameOfCurrentBackend, isFound, err := unstructured.NestedString(typedBackend, "serviceName") assert.NoError(t, err) @@ -279,7 +279,7 @@ func TestSetWeight(t *testing.T) { func TestGetHttpRouteError(t *testing.T) { type testcase struct { - routes []interface{} + routes []any ref string } testcases := []testcase{ @@ -288,28 +288,28 @@ func TestGetHttpRouteError(t *testing.T) { ref: "nil", }, { - routes: []interface{}{""}, + routes: []any{""}, ref: "Failed type", }, { - routes: []interface{}{ - map[string]interface{}{ + routes: []any{ + map[string]any{ "x": nil, }, }, ref: "noname", }, { - routes: []interface{}{ - map[string]interface{}{ + routes: []any{ + map[string]any{ "name": 123, }, }, ref: "name type error", }, { - routes: []interface{}{ - map[string]interface{}{ + routes: []any{ + map[string]any{ "name": "123", }, }, @@ -324,11 +324,11 @@ func TestGetHttpRouteError(t *testing.T) { } func TestGetBackendsError(t *testing.T) { - testcases := []interface{}{ + testcases := []any{ nil, 123, - map[string]interface{}{}, - map[string]interface{}{ + map[string]any{}, + map[string]any{ "backends": "123", }, } @@ -342,26 +342,26 @@ func TestGetBackendsError(t *testing.T) { func TestSetBackendWeightError(t *testing.T) { type testcase struct { backendName string - backends []interface{} + backends []any weight int64 } testcases := []testcase{ {}, { - backends: []interface{}{ + backends: []any{ "", }, }, { - backends: []interface{}{ - map[string]interface{}{ + backends: []any{ + map[string]any{ "abc": 123, }, }, }, { - backends: []interface{}{ - map[string]interface{}{ + backends: []any{ + map[string]any{ "serviceName": 123, }, }, @@ -512,7 +512,7 @@ func TestSetHeaderRoute(t *testing.T) { assert.NoError(t, err) assert.Equal(t, true, ok) - rule, ok := rules[0].(map[string]interface{}) + rule, ok := rules[0].(map[string]any) assert.Equal(t, true, ok) priority, ok, err := unstructured.NestedInt64(rule, "priority") assert.NoError(t, err) @@ -548,7 +548,7 @@ func TestSetHeaderRoute(t *testing.T) { assert.NoError(t, err) assert.Equal(t, true, ok) - rule, ok := rules[0].(map[string]interface{}) + rule, ok := rules[0].(map[string]any) assert.Equal(t, true, ok) priority, ok, err := unstructured.NestedInt64(rule, "priority") assert.NoError(t, err) @@ -597,7 +597,7 @@ func TestSetHeaderRoute(t *testing.T) { assert.NoError(t, err) assert.Equal(t, true, ok) - rule, ok := rules[0].(map[string]interface{}) + rule, ok := rules[0].(map[string]any) assert.Equal(t, true, ok) exprs, ok, err := unstructured.NestedSlice(rule, "match", "exprs") assert.NoError(t, err) @@ -652,7 +652,7 @@ func TestSetHeaderRoute(t *testing.T) { assert.NoError(t, err) assert.Equal(t, true, ok) - rule, ok := rules[0].(map[string]interface{}) + rule, ok := rules[0].(map[string]any) assert.Equal(t, true, ok) exprs, ok, err := unstructured.NestedSlice(rule, "match", "exprs") assert.NoError(t, err) @@ -765,11 +765,11 @@ func TestSetHeaderRoute(t *testing.T) { }) } -func assertExpr(t *testing.T, expr interface{}, op, name, scope, value string) { +func assertExpr(t *testing.T, expr any, op, name, scope, value string) { if expr == nil { assert.Error(t, errors.New("expr is nil")) } - typedExpr, ok := expr.(map[string]interface{}) + typedExpr, ok := expr.(map[string]any) assert.Equal(t, true, ok) opAct, ok, err := unstructured.NestedString(typedExpr, "op") diff --git a/rollout/trafficrouting/apisix/mocks/apisix.go b/rollout/trafficrouting/apisix/mocks/apisix.go index c884167412..2bba83c499 100644 --- a/rollout/trafficrouting/apisix/mocks/apisix.go +++ b/rollout/trafficrouting/apisix/mocks/apisix.go @@ -45,10 +45,10 @@ var ( ErrorApisixRouteObj *unstructured.Unstructured ) -func (f *FakeRecorder) Eventf(object runtime.Object, opts argoRecord.EventOptions, messageFmt string, args ...interface{}) { +func (f *FakeRecorder) Eventf(object runtime.Object, opts argoRecord.EventOptions, messageFmt string, args ...any) { } -func (f *FakeRecorder) Warnf(object runtime.Object, opts argoRecord.EventOptions, messageFmt string, args ...interface{}) { +func (f *FakeRecorder) Warnf(object runtime.Object, opts argoRecord.EventOptions, messageFmt string, args ...any) { } func (f *FakeRecorder) K8sRecorder() record.EventRecorder { diff --git a/rollout/trafficrouting/appmesh/appmesh.go b/rollout/trafficrouting/appmesh/appmesh.go index f0528f779a..6272571111 100644 --- a/rollout/trafficrouting/appmesh/appmesh.go +++ b/rollout/trafficrouting/appmesh/appmesh.go @@ -141,7 +141,7 @@ func (r *Reconciler) SetHeaderRoute(headerRouting *v1alpha1.SetHeaderRoute) erro } type routeReconcileContext struct { - route map[string]interface{} + route map[string]any routeIndex int routeFldPath *field.Path rCanaryVnodeRef *v1alpha1.AppMeshVirtualNodeReference @@ -170,7 +170,7 @@ func (r *Reconciler) reconcileVirtualRouter(ctx context.Context, rRoutes []strin for idx, routeI := range routesI { routeFldPath := routesFldPath.Index(idx) - route, ok := routeI.(map[string]interface{}) + route, ok := routeI.(map[string]any) if !ok { return field.Invalid(routeFldPath, uVrCopy.GetName(), ErrNotWellFormed) } @@ -232,12 +232,12 @@ func (r *Reconciler) reconcileRoute(ctx context.Context, uVr *unstructured.Unstr requiresUpdate := false for idx, wtI := range weightedTargets { wtFldPath := weightedTargetsFldPath.Index(idx) - wt, ok := wtI.(map[string]interface{}) + wt, ok := wtI.(map[string]any) if !ok { return false, field.Invalid(wtFldPath, uVr.GetName(), ErrNotWellFormed) } wtVnRefFldPath := wtFldPath.Child("virtualNodeRef") - wtVnRef, ok := wt["virtualNodeRef"].(map[string]interface{}) + wtVnRef, ok := wt["virtualNodeRef"].(map[string]any) if !ok { return false, field.Invalid(wtVnRefFldPath, uVr.GetName(), ErrNotWellFormed) } @@ -324,22 +324,22 @@ func (r *Reconciler) Type() string { return Type } -func getPodSelectorMatchLabels(vnode *unstructured.Unstructured) (map[string]interface{}, error) { +func getPodSelectorMatchLabels(vnode *unstructured.Unstructured) (map[string]any, error) { m, found, err := unstructured.NestedMap(vnode.Object, "spec", "podSelector", "matchLabels") if err != nil { return nil, err } if !found || m == nil { - return make(map[string]interface{}), nil + return make(map[string]any), nil } return m, nil } -func setPodSelectorMatchLabels(vnode *unstructured.Unstructured, ml map[string]interface{}) error { +func setPodSelectorMatchLabels(vnode *unstructured.Unstructured, ml map[string]any) error { return unstructured.SetNestedMap(vnode.Object, ml, "spec", "podSelector", "matchLabels") } -func toInt64(obj interface{}) (int64, error) { +func toInt64(obj any) (int64, error) { switch i := obj.(type) { case float64: return int64(i), nil @@ -370,8 +370,8 @@ func toInt64(obj interface{}) (int64, error) { } } -func GetRouteRule(route map[string]interface{}) (map[string]interface{}, string, error) { - var routeRule map[string]interface{} +func GetRouteRule(route map[string]any) (map[string]any, string, error) { + var routeRule map[string]any var routeType string for _, rType := range supportedRouteTypes { r, found, err := unstructured.NestedMap(route, rType) diff --git a/rollout/trafficrouting/appmesh/appmesh_test.go b/rollout/trafficrouting/appmesh/appmesh_test.go index 5f7ed41843..e110f8227b 100644 --- a/rollout/trafficrouting/appmesh/appmesh_test.go +++ b/rollout/trafficrouting/appmesh/appmesh_test.go @@ -218,7 +218,7 @@ func TestSetWeightWithUpdateVirtualRouterError(t *testing.T) { func TestSetWeightWithInvalidRoutes(t *testing.T) { type args struct { - routes []interface{} + routes []any fieldPathWithError string } @@ -236,7 +236,7 @@ func TestSetWeightWithInvalidRoutes(t *testing.T) { { name: "route with malformed content", args: args{ - routes: []interface{}{ + routes: []any{ "malformed-content", }, fieldPathWithError: field.NewPath("spec", "routes").Index(0).String(), @@ -245,9 +245,9 @@ func TestSetWeightWithInvalidRoutes(t *testing.T) { { name: "route with no name", args: args{ - routes: []interface{}{ - map[string]interface{}{ - "httpRoute": map[string]interface{}{}, + routes: []any{ + map[string]any{ + "httpRoute": map[string]any{}, }, }, fieldPathWithError: field.NewPath("spec", "routes").Index(0).Child("name").String(), @@ -256,10 +256,10 @@ func TestSetWeightWithInvalidRoutes(t *testing.T) { { name: "route with bad route-type", args: args{ - routes: []interface{}{ - map[string]interface{}{ + routes: []any{ + map[string]any{ "name": "primary", - "badRoute": map[string]interface{}{}, + "badRoute": map[string]any{}, }, }, fieldPathWithError: field.NewPath("spec", "routes").Index(0).String(), @@ -268,10 +268,10 @@ func TestSetWeightWithInvalidRoutes(t *testing.T) { { name: "route with no targets", args: args{ - routes: []interface{}{ - map[string]interface{}{ + routes: []any{ + map[string]any{ "name": "primary", - "httpRoute": map[string]interface{}{}, + "httpRoute": map[string]any{}, }, }, fieldPathWithError: field.NewPath("spec", "routes").Index(0).Child("httpRoute").Child("action").Child("weightedTargets").String(), @@ -654,9 +654,9 @@ func TestUpdateHashWhenUpdateCanaryVirtualNodeFails(t *testing.T) { func TestUpdateHashWithVirtualNodeMissingMatchLabels(t *testing.T) { canaryVnode := unstructuredutil.StrToUnstructuredUnsafe(baselineCanaryVnode) - unstructured.SetNestedMap(canaryVnode.Object, make(map[string]interface{}), "spec", "podSelector") + unstructured.SetNestedMap(canaryVnode.Object, make(map[string]any), "spec", "podSelector") stableVnode := unstructuredutil.StrToUnstructuredUnsafe(baselineStableVnode) - unstructured.SetNestedMap(stableVnode.Object, make(map[string]interface{}), "spec", "podSelector") + unstructured.SetNestedMap(stableVnode.Object, make(map[string]any), "spec", "podSelector") client := testutil.NewFakeDynamicClient(canaryVnode, stableVnode) cfg := ReconcilerConfig{ Rollout: fakeRollout(), @@ -704,13 +704,13 @@ func assertSetWeightAction(t *testing.T, action k8stesting.Action, desiredWeight routesI, _, err := unstructured.NestedSlice(uVr, "spec", "routes") assert.Nil(t, err) for _, routeI := range routesI { - route, _ := routeI.(map[string]interface{}) + route, _ := routeI.(map[string]any) weightedTargetsI, found, err := unstructured.NestedSlice(route, routeType, "action", "weightedTargets") assert.Nil(t, err) assert.True(t, found, "Did not find weightedTargets in route") assert.Len(t, weightedTargetsI, 2) for _, wtI := range weightedTargetsI { - wt, _ := wtI.(map[string]interface{}) + wt, _ := wtI.(map[string]any) vnodeName, _, err := unstructured.NestedString(wt, "virtualNodeRef", "name") assert.Nil(t, err) weight, err := toInt64(wt["weight"]) diff --git a/rollout/trafficrouting/appmesh/resource_client.go b/rollout/trafficrouting/appmesh/resource_client.go index 4171b9a385..4dbc4bd8cc 100644 --- a/rollout/trafficrouting/appmesh/resource_client.go +++ b/rollout/trafficrouting/appmesh/resource_client.go @@ -61,7 +61,7 @@ func (rc *ResourceClient) GetVirtualRouterCRForVirtualService(ctx context.Contex return rc.GetVirtualRouterCR(ctx, namespace, name) } -func defaultIfEmpty(strI interface{}, defaultStr string) string { +func defaultIfEmpty(strI any, defaultStr string) string { if strI == nil { return defaultStr } else { diff --git a/rollout/trafficrouting/istio/controller.go b/rollout/trafficrouting/istio/controller.go index 847ae65956..c85c4bc118 100644 --- a/rollout/trafficrouting/istio/controller.go +++ b/rollout/trafficrouting/istio/controller.go @@ -43,7 +43,7 @@ const ( type IstioControllerConfig struct { ArgoprojClientSet roclientset.Interface DynamicClientSet dynamic.Interface - EnqueueRollout func(ro interface{}) + EnqueueRollout func(ro any) RolloutsInformer informers.RolloutInformer VirtualServiceInformer cache.SharedIndexInformer DestinationRuleInformer cache.SharedIndexInformer @@ -67,7 +67,7 @@ func NewIstioController(cfg IstioControllerConfig) *IstioController { // Add a Rollout index against referenced VirtualServices and DestinationRules util.CheckErr(cfg.RolloutsInformer.Informer().AddIndexers(cache.Indexers{ - virtualServiceIndexName: func(obj interface{}) (strings []string, e error) { + virtualServiceIndexName: func(obj any) (strings []string, e error) { if ro := unstructuredutil.ObjectToRollout(obj); ro != nil { return istioutil.GetRolloutVirtualServiceKeys(ro), nil } @@ -75,7 +75,7 @@ func NewIstioController(cfg IstioControllerConfig) *IstioController { }, })) util.CheckErr(cfg.RolloutsInformer.Informer().AddIndexers(cache.Indexers{ - destinationRuleIndexName: func(obj interface{}) (strings []string, e error) { + destinationRuleIndexName: func(obj any) (strings []string, e error) { if ro := unstructuredutil.ObjectToRollout(obj); ro != nil { return istioutil.GetRolloutDesinationRuleKeys(ro), nil } @@ -85,27 +85,27 @@ func NewIstioController(cfg IstioControllerConfig) *IstioController { // When a VirtualService changes, simply enqueue the referencing rollout c.VirtualServiceInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { c.EnqueueRolloutFromIstioVirtualService(obj) }, // TODO: DeepEquals on httpRoutes - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { c.EnqueueRolloutFromIstioVirtualService(new) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { c.EnqueueRolloutFromIstioVirtualService(obj) }, }) // When a DestinationRule changes, enqueue the DestinationRule for processing c.DestinationRuleInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { c.EnqueueDestinationRule(obj) }, - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { c.EnqueueDestinationRule(new) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { c.EnqueueDestinationRule(obj) }, }) @@ -158,13 +158,13 @@ func (c *IstioController) Run(ctx context.Context) { // EnqueueDestinationRule examines a VirtualService, finds the Rollout referencing // that VirtualService, and enqueues the corresponding Rollout for reconciliation -func (c *IstioController) EnqueueDestinationRule(obj interface{}) { +func (c *IstioController) EnqueueDestinationRule(obj any) { controllerutil.EnqueueRateLimited(obj, c.destinationRuleWorkqueue) } // EnqueueRolloutFromIstioVirtualService examines a VirtualService, finds the Rollout referencing // that VirtualService, and enqueues the corresponding Rollout for reconciliation -func (c *IstioController) EnqueueRolloutFromIstioVirtualService(vsvc interface{}) { +func (c *IstioController) EnqueueRolloutFromIstioVirtualService(vsvc any) { acc, err := meta.Accessor(vsvc) if err != nil { log.Errorf("Error processing istio VirtualService from watch: %v: %v", err, vsvc) diff --git a/rollout/trafficrouting/istio/controller_test.go b/rollout/trafficrouting/istio/controller_test.go index af37f11053..97d85cbaff 100644 --- a/rollout/trafficrouting/istio/controller_test.go +++ b/rollout/trafficrouting/istio/controller_test.go @@ -45,7 +45,7 @@ func NewFakeIstioController(objs ...runtime.Object) *IstioController { c := NewIstioController(IstioControllerConfig{ ArgoprojClientSet: rolloutClient, DynamicClientSet: dynamicClientSet, - EnqueueRollout: func(ro interface{}) {}, + EnqueueRollout: func(ro any) {}, RolloutsInformer: rolloutInformerFactory.Argoproj().V1alpha1().Rollouts(), VirtualServiceInformer: virtualServiceInformer, DestinationRuleInformer: destinationRuleInformer, @@ -178,7 +178,7 @@ spec: key, err := cache.MetaNamespaceKeyFunc(destRule) assert.NoError(t, err) enqueueCalled := false - c.EnqueueRollout = func(obj interface{}) { + c.EnqueueRollout = func(obj any) { enqueueCalled = true } @@ -199,7 +199,7 @@ spec: key, err := cache.MetaNamespaceKeyFunc(destRule) assert.NoError(t, err) enqueueCalled := false - c.EnqueueRollout = func(obj interface{}) { + c.EnqueueRollout = func(obj any) { enqueueCalled = true } @@ -219,7 +219,7 @@ spec: key, err := cache.MetaNamespaceKeyFunc(destRule) assert.NoError(t, err) enqueueCalled := false - c.EnqueueRollout = func(obj interface{}) { + c.EnqueueRollout = func(obj any) { enqueueCalled = true } diff --git a/rollout/trafficrouting/istio/istio.go b/rollout/trafficrouting/istio/istio.go index 70b0cc0e68..dd44da7b25 100644 --- a/rollout/trafficrouting/istio/istio.go +++ b/rollout/trafficrouting/istio/istio.go @@ -74,26 +74,26 @@ const ( invalidCasting = "Invalid casting: field '%s' is not of type '%s'" ) -func (patches virtualServicePatches) patchVirtualService(httpRoutes []interface{}, tlsRoutes []interface{}, tcpRoutes []interface{}) error { +func (patches virtualServicePatches) patchVirtualService(httpRoutes []any, tlsRoutes []any, tcpRoutes []any) error { for _, patch := range patches { - var route map[string]interface{} + var route map[string]any err := false if patch.routeType == Http { - route, err = httpRoutes[patch.routeIndex].(map[string]interface{}) + route, err = httpRoutes[patch.routeIndex].(map[string]any) } else if patch.routeType == Tls { - route, err = tlsRoutes[patch.routeIndex].(map[string]interface{}) + route, err = tlsRoutes[patch.routeIndex].(map[string]any) } else if patch.routeType == Tcp { - route, err = tcpRoutes[patch.routeIndex].(map[string]interface{}) + route, err = tcpRoutes[patch.routeIndex].(map[string]any) } if !err { return fmt.Errorf(invalidCasting, patch.routeType+"[]", "map[string]interface") } - destinations, ok := route["route"].([]interface{}) + destinations, ok := route["route"].([]any) if !ok { return fmt.Errorf(invalidCasting, patch.routeType+"[].route", "[]interface") } if patch.destinationIndex < len(destinations) { - destination, ok := destinations[patch.destinationIndex].(map[string]interface{}) + destination, ok := destinations[patch.destinationIndex].(map[string]any) if !ok { return fmt.Errorf(invalidCasting, patch.routeType+"[].route[].destination", "map[string]interface") } @@ -105,9 +105,9 @@ func (patches virtualServicePatches) patchVirtualService(httpRoutes []interface{ } route["route"] = destinations } else { - destination := make(map[string]interface{}, 0) + destination := make(map[string]any, 0) destination["weight"] = float64(patch.weight) - destination["destination"] = map[string]interface{}{"host": patch.host} + destination["destination"] = map[string]any{"host": patch.host} destinations = append(destinations, destination) route["route"] = destinations } @@ -388,12 +388,12 @@ func (r *Reconciler) UpdateHash(canaryHash, stableHash string, additionalDestina // destinationRuleReplaceExtraMarshal relace the key of "Extra" with the actual content // e.g., "trafficpolicy" and return the bytes of the new object func destinationRuleReplaceExtraMarshal(dRule *DestinationRule) []byte { - dRuleNew := map[string]interface{}{} + dRuleNew := map[string]any{} dRuleNew["metadata"] = dRule.ObjectMeta.DeepCopy() - subsets := []map[string]interface{}{} + subsets := []map[string]any{} for _, subset := range dRule.Spec.Subsets { - newsubset := map[string]interface{}{} + newsubset := map[string]any{} newsubset["name"] = subset.Name newsubset["labels"] = subset.Labels @@ -402,7 +402,7 @@ func destinationRuleReplaceExtraMarshal(dRule *DestinationRule) []byte { continue } - extra := map[string]interface{}{} + extra := map[string]any{} inputbyte, _ := json.Marshal(subset.Extra) json.Unmarshal(inputbyte, &extra) @@ -412,7 +412,7 @@ func destinationRuleReplaceExtraMarshal(dRule *DestinationRule) []byte { } subsets = append(subsets, newsubset) } - dRuleNew["spec"] = map[string]interface{}{ + dRuleNew["spec"] = map[string]any{ "subsets": subsets, "host": dRule.Spec.Host, } @@ -474,7 +474,7 @@ func unstructuredToDestinationRules(un *unstructured.Unstructured) ([]byte, *Des func unMarshalSubsets(dRule *DestinationRule, dRuleBytes []byte) error { var err error - unstructured := map[string]interface{}{} + unstructured := map[string]any{} var extractFieldBytes func([]byte, string) ([]byte, error) extractFieldBytes = func(input []byte, name string) ([]byte, error) { err = json.Unmarshal(input, &unstructured) @@ -498,7 +498,7 @@ func unMarshalSubsets(dRule *DestinationRule, dRuleBytes []byte) error { return err } - subsetsMap := []map[string]interface{}{} + subsetsMap := []map[string]any{} err = json.Unmarshal(subsetsBytes, &subsetsMap) if err != nil { return err @@ -523,9 +523,9 @@ func unMarshalSubsets(dRule *DestinationRule, dRuleBytes []byte) error { return nil } -func UnmarshalJson(input []byte, result interface{}) (map[string]interface{}, error) { +func UnmarshalJson(input []byte, result any) (map[string]any, error) { // unmarshal json to a map - foomap := make(map[string]interface{}) + foomap := make(map[string]any) json.Unmarshal(input, &foomap) // create a mapstructure decoder @@ -545,7 +545,7 @@ func UnmarshalJson(input []byte, result interface{}) (map[string]interface{}, er } // copy and return unused fields - unused := map[string]interface{}{} + unused := map[string]any{} for _, k := range md.Unused { unused[k] = foomap[k] } @@ -565,7 +565,7 @@ func jsonBytesToDestinationRule(dRuleBytes []byte) (*DestinationRule, error) { return &dRule, nil } -func GetHttpRoutesI(obj *unstructured.Unstructured) ([]interface{}, error) { +func GetHttpRoutesI(obj *unstructured.Unstructured) ([]any, error) { httpRoutesI, notFound, err := unstructured.NestedSlice(obj.Object, "spec", Http) if !notFound { return nil, fmt.Errorf(SpecHttpNotFound) @@ -576,7 +576,7 @@ func GetHttpRoutesI(obj *unstructured.Unstructured) ([]interface{}, error) { return httpRoutesI, nil } -func GetTlsRoutesI(obj *unstructured.Unstructured) ([]interface{}, error) { +func GetTlsRoutesI(obj *unstructured.Unstructured) ([]any, error) { tlsRoutesI, notFound, err := unstructured.NestedSlice(obj.Object, "spec", Tls) if !notFound { return nil, fmt.Errorf(SpecHttpNotFound) @@ -587,7 +587,7 @@ func GetTlsRoutesI(obj *unstructured.Unstructured) ([]interface{}, error) { return tlsRoutesI, nil } -func GetTcpRoutesI(obj *unstructured.Unstructured) ([]interface{}, error) { +func GetTcpRoutesI(obj *unstructured.Unstructured) ([]any, error) { tcpRoutesI, notFound, err := unstructured.NestedSlice(obj.Object, "spec", Tcp) if !notFound { return nil, fmt.Errorf(".spec.tcp is not defined") @@ -598,7 +598,7 @@ func GetTcpRoutesI(obj *unstructured.Unstructured) ([]interface{}, error) { return tcpRoutesI, nil } -func GetHttpRoutes(httpRoutesI []interface{}) ([]VirtualServiceHTTPRoute, error) { +func GetHttpRoutes(httpRoutesI []any) ([]VirtualServiceHTTPRoute, error) { routeBytes, err := json.Marshal(httpRoutesI) if err != nil { return nil, err @@ -613,7 +613,7 @@ func GetHttpRoutes(httpRoutesI []interface{}) ([]VirtualServiceHTTPRoute, error) return httpRoutes, nil } -func GetTlsRoutes(obj *unstructured.Unstructured, tlsRoutesI []interface{}) ([]VirtualServiceTLSRoute, error) { +func GetTlsRoutes(obj *unstructured.Unstructured, tlsRoutesI []any) ([]VirtualServiceTLSRoute, error) { routeBytes, err := json.Marshal(tlsRoutesI) if err != nil { return nil, err @@ -628,7 +628,7 @@ func GetTlsRoutes(obj *unstructured.Unstructured, tlsRoutesI []interface{}) ([]V return tlsRoutes, nil } -func GetTcpRoutes(obj *unstructured.Unstructured, tcpRoutesI []interface{}) ([]VirtualServiceTCPRoute, error) { +func GetTcpRoutes(obj *unstructured.Unstructured, tcpRoutesI []any) ([]VirtualServiceTCPRoute, error) { routeBytes, err := json.Marshal(tcpRoutesI) if err != nil { return nil, err @@ -825,8 +825,8 @@ func (r *Reconciler) getDestinationRule(dRuleSpec *v1alpha1.IstioDestinationRule return origBytes, dRule, dRuleNew, nil } -func createHeaderRoute(virtualService v1alpha1.IstioVirtualService, unVsvc *unstructured.Unstructured, headerRouting *v1alpha1.SetHeaderRoute, host string, subset string) map[string]interface{} { - var routeMatches []interface{} +func createHeaderRoute(virtualService v1alpha1.IstioVirtualService, unVsvc *unstructured.Unstructured, headerRouting *v1alpha1.SetHeaderRoute, host string, subset string) map[string]any { + var routeMatches []any for _, hrm := range headerRouting.Match { routeMatches = append(routeMatches, createHeaderRouteMatch(hrm)) } @@ -838,41 +838,41 @@ func createHeaderRoute(virtualService v1alpha1.IstioVirtualService, unVsvc *unst canaryDestination := routeDestination(host, port.Number, subset, 100) - return map[string]interface{}{ + return map[string]any{ "name": headerRouting.Name, "match": routeMatches, - "route": []interface{}{canaryDestination}, + "route": []any{canaryDestination}, } } -func createHeaderRouteMatch(hrm v1alpha1.HeaderRoutingMatch) interface{} { - res := map[string]interface{}{} +func createHeaderRouteMatch(hrm v1alpha1.HeaderRoutingMatch) any { + res := map[string]any{} value := hrm.HeaderValue setMapValueIfNotEmpty(res, "exact", value.Exact) setMapValueIfNotEmpty(res, "regex", value.Regex) setMapValueIfNotEmpty(res, "prefix", value.Prefix) - return map[string]interface{}{ - "headers": map[string]interface{}{hrm.HeaderName: res}, + return map[string]any{ + "headers": map[string]any{hrm.HeaderName: res}, } } -func setMapValueIfNotEmpty(m map[string]interface{}, key string, value string) { +func setMapValueIfNotEmpty(m map[string]any, key string, value string) { if value != "" { m[key] = value } } -func routeDestination(host string, port uint32, subset string, weight int64) map[string]interface{} { - dest := map[string]interface{}{ +func routeDestination(host string, port uint32, subset string, weight int64) map[string]any { + dest := map[string]any{ "host": host, } if port > 0 { - dest["port"] = map[string]interface{}{"number": int64(port)} + dest["port"] = map[string]any{"number": int64(port)} } if subset != "" { dest["subset"] = subset } - routeValue := map[string]interface{}{ + routeValue := map[string]any{ "weight": float64(weight), "destination": dest, } @@ -1041,10 +1041,10 @@ func ValidateHTTPRoutes(r *v1alpha1.Rollout, routeNames []string, httpRoutes []V if err != nil { return fmt.Errorf("[ValidateHTTPRoutes] failed to marshal http routes: %w", err) } - var httpRoutesI []interface{} + var httpRoutesI []any err = json.Unmarshal(httpRoutesBytes, &httpRoutesI) if err != nil { - return fmt.Errorf("[ValidateHTTPRoutes] failed to marshal http routes to []interface{}: %w", err) + return fmt.Errorf("[ValidateHTTPRoutes] failed to marshal http routes to []any: %w", err) } _, httpRoutesNotWithinManagedRoutes, err := splitManagedRoutesAndNonManagedRoutes(r.Spec.Strategy.Canary.TrafficRouting.ManagedRoutes, httpRoutesI) @@ -1234,7 +1234,7 @@ func (r *Reconciler) reconcileVirtualServiceMirrorRoutes(virtualService v1alpha1 if !found { return fmt.Errorf(SpecHttpNotFound) } - vsRoutes = append([]interface{}{mR}, vsRoutes...) + vsRoutes = append([]any{mR}, vsRoutes...) if err := unstructured.SetNestedSlice(istioVirtualService.Object, vsRoutes, "spec", Http); err != nil { return fmt.Errorf("[reconcileVirtualServiceMirrorRoutes] failed to update virtual service routes via set nested slice: %w", err) } @@ -1243,8 +1243,8 @@ func (r *Reconciler) reconcileVirtualServiceMirrorRoutes(virtualService v1alpha1 } // getVirtualServiceHttpRoutes This returns all the http routes from an istio virtual service as both a rollouts wrapped type -// []VirtualServiceHTTPRoute and a []interface{} of VirtualServiceHTTPRoute -func getVirtualServiceHttpRoutes(obj *unstructured.Unstructured) ([]VirtualServiceHTTPRoute, []interface{}, error) { +// []VirtualServiceHTTPRoute and a []any of VirtualServiceHTTPRoute +func getVirtualServiceHttpRoutes(obj *unstructured.Unstructured) ([]VirtualServiceHTTPRoute, []any, error) { httpRoutesI, err := GetHttpRoutesI(obj) if err != nil { return nil, nil, fmt.Errorf("[getVirtualServiceHttpRoutes] failed to get http route interfaces: %w", err) @@ -1256,9 +1256,9 @@ func getVirtualServiceHttpRoutes(obj *unstructured.Unstructured) ([]VirtualServi return routes, httpRoutesI, nil } -// createMirrorRoute This returns a map[string]interface{} of an istio virtual service mirror route configuration using the last +// createMirrorRoute This returns a map[string]any of an istio virtual service mirror route configuration using the last // set weight as values for the non-matching destinations and canary service for the matching destination. -func createMirrorRoute(virtualService v1alpha1.IstioVirtualService, httpRoutes []VirtualServiceHTTPRoute, mirrorRouting *v1alpha1.SetMirrorRoute, canarySvc string, subset string) (map[string]interface{}, error) { +func createMirrorRoute(virtualService v1alpha1.IstioVirtualService, httpRoutes []VirtualServiceHTTPRoute, mirrorRouting *v1alpha1.SetMirrorRoute, canarySvc string, subset string) (map[string]any, error) { var percent int32 if mirrorRouting.Percentage == nil { percent = 100 @@ -1289,12 +1289,12 @@ func createMirrorRoute(virtualService v1alpha1.IstioVirtualService, httpRoutes [ mirrorDestinations.Port = &Port{Number: route[0].Destination.Port.Number} } - mirrorRoute := map[string]interface{}{ + mirrorRoute := map[string]any{ "name": mirrorRouting.Name, "match": istioMatch, "route": route, "mirror": mirrorDestinations, - "mirrorPercentage": map[string]interface{}{"value": float64(percent)}, + "mirrorPercentage": map[string]any{"value": float64(percent)}, } mirrorRouteBytes, err := json.Marshal(mirrorRoute) @@ -1302,7 +1302,7 @@ func createMirrorRoute(virtualService v1alpha1.IstioVirtualService, httpRoutes [ return nil, fmt.Errorf("[createMirrorRoute] failed to marshal mirror route: %w", err) } - var mirrorRouteI map[string]interface{} + var mirrorRouteI map[string]any err = json.Unmarshal(mirrorRouteBytes, &mirrorRouteI) if err != nil { return nil, fmt.Errorf("[createMirrorRoute] failed to unmarshal mirror route: %w", err) @@ -1336,11 +1336,11 @@ func removeRoute(istioVirtualService *unstructured.Unstructured, routeName strin return fmt.Errorf(SpecHttpNotFound) } - var newVsRoutes []interface{} + var newVsRoutes []any for _, route := range vsRoutes { - routeMap, ok := route.(map[string]interface{}) + routeMap, ok := route.(map[string]any) if !ok { - return fmt.Errorf("Could not cast type to map[string]interface{} to find route name in Istio Virtual Service") + return fmt.Errorf("Could not cast type to map[string]any to find route name in Istio Virtual Service") } routeNameIstioSvc, ok := routeMap["name"].(string) if !ok { @@ -1392,8 +1392,8 @@ func (r *Reconciler) orderRoutes(istioVirtualService *unstructured.Unstructured) // splitManagedRoutesAndNonManagedRoutes This splits the routes from an istio virtual service into two slices // one slice contains all the routes that are also in the rollouts managedRoutes object and one that contains routes // that where only in the virtual service (aka routes that where manually added by user) -func splitManagedRoutesAndNonManagedRoutes(managedRoutes []v1alpha1.MangedRoutes, httpRouteI []interface{}) (httpRoutesWithinManagedRoutes []map[string]interface{}, httpRoutesNotWithinManagedRoutes []map[string]interface{}, err error) { - var httpRoutes []map[string]interface{} +func splitManagedRoutesAndNonManagedRoutes(managedRoutes []v1alpha1.MangedRoutes, httpRouteI []any) (httpRoutesWithinManagedRoutes []map[string]any, httpRoutesNotWithinManagedRoutes []map[string]any, err error) { + var httpRoutes []map[string]any jsonHttpRoutes, err := json.Marshal(httpRouteI) if err != nil { @@ -1424,11 +1424,11 @@ func splitManagedRoutesAndNonManagedRoutes(managedRoutes []v1alpha1.MangedRoutes return httpRoutesWithinManagedRoutes, httpRoutesNotWithinManagedRoutes, nil } -// getOrderedVirtualServiceRoutes This returns an []interface{} of istio virtual routes where the routes are ordered based +// getOrderedVirtualServiceRoutes This returns an []any of istio virtual routes where the routes are ordered based // on the rollouts managedRoutes field. We take the routes from the rollouts managedRoutes field order them and place them on top // of routes that are manually defined within the virtual service (aka. routes that users have defined manually) -func getOrderedVirtualServiceRoutes(httpRouteI []interface{}, managedRoutes []v1alpha1.MangedRoutes, httpRoutesWithinManagedRoutes []map[string]interface{}, httpRoutesNotWithinManagedRoutes []map[string]interface{}) ([]interface{}, error) { - var orderedManagedRoutes []map[string]interface{} +func getOrderedVirtualServiceRoutes(httpRouteI []any, managedRoutes []v1alpha1.MangedRoutes, httpRoutesWithinManagedRoutes []map[string]any, httpRoutesNotWithinManagedRoutes []map[string]any) ([]any, error) { + var orderedManagedRoutes []map[string]any for _, route := range managedRoutes { for _, managedRoute := range httpRoutesWithinManagedRoutes { if route.Name == managedRoute["name"] { @@ -1439,10 +1439,10 @@ func getOrderedVirtualServiceRoutes(httpRouteI []interface{}, managedRoutes []v1 orderedVirtualServiceHTTPRoutes := append(orderedManagedRoutes, httpRoutesNotWithinManagedRoutes...) - var orderedInterfaceVSVCHTTPRoutes []interface{} + var orderedInterfaceVSVCHTTPRoutes []any for _, routeMap := range orderedVirtualServiceHTTPRoutes { for _, route := range httpRouteI { - r := route.(map[string]interface{}) + r := route.(map[string]any) // Not checking the cast success here is ok because it covers the case when the route has no name name, rNameOK := r["name"].(string) @@ -1530,7 +1530,7 @@ func (r *Reconciler) RemoveManagedRoutes() error { if err != nil { return fmt.Errorf("[RemoveManagedRoutes] failed to marshal non-managed routes: %w", err) } - var nonManagedRoutesI []interface{} + var nonManagedRoutesI []any if err := json.Unmarshal(jsonNonManagedRoutes, &nonManagedRoutesI); err != nil { return fmt.Errorf("[RemoveManagedRoutes] failed to split managaed and non-managed routes: %w", err) } diff --git a/rollout/trafficrouting/istio/istio_test.go b/rollout/trafficrouting/istio/istio_test.go index ea6474ef5f..c18cdedae5 100644 --- a/rollout/trafficrouting/istio/istio_test.go +++ b/rollout/trafficrouting/istio/istio_test.go @@ -866,18 +866,18 @@ func TestHttpReconcileHeaderRouteWithExtra(t *testing.T) { assert.NoError(t, err) assert.True(t, found) - r0 := routes[0].(map[string]interface{}) - route, found := r0["route"].([]interface{}) + r0 := routes[0].(map[string]any) + route, found := r0["route"].([]any) assert.True(t, found) - port1 := route[0].(map[string]interface{})["destination"].(map[string]interface{})["port"].(map[string]interface{})["number"] + port1 := route[0].(map[string]any)["destination"].(map[string]any)["port"].(map[string]any)["number"] assert.True(t, port1 == int64(8443)) - r1 := routes[1].(map[string]interface{}) + r1 := routes[1].(map[string]any) _, found = r1["retries"] assert.True(t, found) - r2 := routes[2].(map[string]interface{}) + r2 := routes[2].(map[string]any) _, found = r2["retries"] assert.True(t, found) _, found = r2["corsPolicy"] @@ -891,14 +891,14 @@ func TestHttpReconcileHeaderRouteWithExtra(t *testing.T) { assert.NoError(t, err) assert.True(t, found) - r0 = routes[0].(map[string]interface{}) - route, found = r0["route"].([]interface{}) + r0 = routes[0].(map[string]any) + route, found = r0["route"].([]any) assert.True(t, found) - port1 = route[0].(map[string]interface{})["destination"].(map[string]interface{})["port"].(map[string]interface{})["number"] + port1 = route[0].(map[string]any)["destination"].(map[string]any)["port"].(map[string]any)["number"] assert.True(t, port1 == float64(8443)) - r2 = routes[1].(map[string]interface{}) + r2 = routes[1].(map[string]any) _, found = r2["retries"] assert.True(t, found) _, found = r2["corsPolicy"] @@ -1498,34 +1498,34 @@ func TestInvalidPatches(t *testing.T) { weight: 10, }} { - invalidHTTPRoute := make([]interface{}, 1) - invalidTlsRoute := make([]interface{}, 1) - invalidTcpRoute := make([]interface{}, 1) + invalidHTTPRoute := make([]any, 1) + invalidTlsRoute := make([]any, 1) + invalidTcpRoute := make([]any, 1) invalidHTTPRoute[0] = "not a map" err := patches.patchVirtualService(invalidHTTPRoute, invalidTlsRoute, invalidTcpRoute) assert.Error(t, err, invalidCasting, "http[]", "map[string]interface") } { - invalidHTTPRoute := []interface{}{ - map[string]interface{}{ + invalidHTTPRoute := []any{ + map[string]any{ "route": "not a []interface", }, } - invalidTlsRoute := make([]interface{}, 1) - invalidTcpRoute := make([]interface{}, 1) + invalidTlsRoute := make([]any, 1) + invalidTcpRoute := make([]any, 1) err := patches.patchVirtualService(invalidHTTPRoute, invalidTlsRoute, invalidTcpRoute) assert.Error(t, err, invalidCasting, "http[].route", "[]interface") } { - invalidHTTPRoute := []interface{}{ - map[string]interface{}{ - "route": []interface{}{ + invalidHTTPRoute := []any{ + map[string]any{ + "route": []any{ "destination", }, }, } - invalidTlsRoute := make([]interface{}, 1) - invalidTCPRoute := make([]interface{}, 1) + invalidTlsRoute := make([]any, 1) + invalidTCPRoute := make([]any, 1) err := patches.patchVirtualService(invalidHTTPRoute, invalidTlsRoute, invalidTCPRoute) assert.Error(t, err, invalidCasting, "http[].route[].destination", "map[string]interface") } @@ -2543,20 +2543,20 @@ func TestHttpReconcileMirrorRouteWithExtraFields(t *testing.T) { assert.NoError(t, err) assert.True(t, found) - r0 := routes[0].(map[string]interface{}) - mirrorRoute, found := r0["route"].([]interface{}) + r0 := routes[0].(map[string]any) + mirrorRoute, found := r0["route"].([]any) assert.True(t, found) - port1 := mirrorRoute[0].(map[string]interface{})["destination"].(map[string]interface{})["port"].(map[string]interface{})["number"] - port2 := mirrorRoute[1].(map[string]interface{})["destination"].(map[string]interface{})["port"].(map[string]interface{})["number"] + port1 := mirrorRoute[0].(map[string]any)["destination"].(map[string]any)["port"].(map[string]any)["number"] + port2 := mirrorRoute[1].(map[string]any)["destination"].(map[string]any)["port"].(map[string]any)["number"] assert.True(t, port1 == float64(8443)) assert.True(t, port2 == float64(8443)) - r1 := routes[1].(map[string]interface{}) + r1 := routes[1].(map[string]any) _, found = r1["retries"] assert.True(t, found) - r2 := routes[2].(map[string]interface{}) + r2 := routes[2].(map[string]any) _, found = r2["retries"] assert.True(t, found) _, found = r2["corsPolicy"] diff --git a/rollout/trafficrouting/istio/istio_types.go b/rollout/trafficrouting/istio/istio_types.go index 9d8f37d3f3..9544efc49e 100644 --- a/rollout/trafficrouting/istio/istio_types.go +++ b/rollout/trafficrouting/istio/istio_types.go @@ -108,5 +108,5 @@ type Subset struct { Name string `json:"name,omitempty"` Labels map[string]string `json:"labels,omitempty"` // TrafficPolicy *json.RawMessage `json:"trafficPolicy,omitempty"` - Extra map[string]interface{} `json:",omitempty"` + Extra map[string]any `json:",omitempty"` } diff --git a/rollout/trafficrouting/plugin/rpc/rpc.go b/rollout/trafficrouting/plugin/rpc/rpc.go index 78cb4103d9..297ff9d21b 100644 --- a/rollout/trafficrouting/plugin/rpc/rpc.go +++ b/rollout/trafficrouting/plugin/rpc/rpc.go @@ -65,7 +65,7 @@ type TrafficRouterPluginRPC struct{ client *rpc.Client } // this gets called once during startup of the plugin and can be used to set up informers or k8s clients etc. func (g *TrafficRouterPluginRPC) InitPlugin() types.RpcError { var resp types.RpcError - err := g.client.Call("Plugin.InitPlugin", new(interface{}), &resp) + err := g.client.Call("Plugin.InitPlugin", new(any), &resp) if err != nil { return types.RpcError{ErrorString: fmt.Sprintf("InitPlugin rpc call error: %s", err)} } @@ -75,7 +75,7 @@ func (g *TrafficRouterPluginRPC) InitPlugin() types.RpcError { // UpdateHash informs a traffic routing reconciler about new canary, stable, and additionalDestination(s) pod hashes func (g *TrafficRouterPluginRPC) UpdateHash(rollout *v1alpha1.Rollout, canaryHash string, stableHash string, additionalDestinations []v1alpha1.WeightDestination) types.RpcError { var resp types.RpcError - var args interface{} = UpdateHashArgs{ + var args any = UpdateHashArgs{ Rollout: *rollout, CanaryHash: canaryHash, StableHash: stableHash, @@ -91,7 +91,7 @@ func (g *TrafficRouterPluginRPC) UpdateHash(rollout *v1alpha1.Rollout, canaryHas // SetWeight sets the canary weight to the desired weight func (g *TrafficRouterPluginRPC) SetWeight(rollout *v1alpha1.Rollout, desiredWeight int32, additionalDestinations []v1alpha1.WeightDestination) types.RpcError { var resp types.RpcError - var args interface{} = SetWeightAndVerifyWeightArgs{ + var args any = SetWeightAndVerifyWeightArgs{ Rollout: *rollout, DesiredWeight: desiredWeight, AdditionalDestinations: additionalDestinations, @@ -106,7 +106,7 @@ func (g *TrafficRouterPluginRPC) SetWeight(rollout *v1alpha1.Rollout, desiredWei // SetHeaderRoute sets the header routing step func (g *TrafficRouterPluginRPC) SetHeaderRoute(rollout *v1alpha1.Rollout, setHeaderRoute *v1alpha1.SetHeaderRoute) types.RpcError { var resp types.RpcError - var args interface{} = SetHeaderArgs{ + var args any = SetHeaderArgs{ Rollout: *rollout, SetHeaderRoute: *setHeaderRoute, } @@ -120,7 +120,7 @@ func (g *TrafficRouterPluginRPC) SetHeaderRoute(rollout *v1alpha1.Rollout, setHe // SetMirrorRoute sets up the traffic router to mirror traffic to a service func (g *TrafficRouterPluginRPC) SetMirrorRoute(rollout *v1alpha1.Rollout, setMirrorRoute *v1alpha1.SetMirrorRoute) types.RpcError { var resp types.RpcError - var args interface{} = SetMirrorArgs{ + var args any = SetMirrorArgs{ Rollout: *rollout, SetMirrorRoute: *setMirrorRoute, } @@ -134,7 +134,7 @@ func (g *TrafficRouterPluginRPC) SetMirrorRoute(rollout *v1alpha1.Rollout, setMi // Type returns the type of the traffic routing reconciler func (g *TrafficRouterPluginRPC) Type() string { var resp string - err := g.client.Call("Plugin.Type", new(interface{}), &resp) + err := g.client.Call("Plugin.Type", new(any), &resp) if err != nil { return fmt.Sprintf("Type rpc call error: %s", err) } @@ -146,7 +146,7 @@ func (g *TrafficRouterPluginRPC) Type() string { // Returns nil if weight verification is not supported or not applicable func (g *TrafficRouterPluginRPC) VerifyWeight(rollout *v1alpha1.Rollout, desiredWeight int32, additionalDestinations []v1alpha1.WeightDestination) (types.RpcVerified, types.RpcError) { var resp VerifyWeightResponse - var args interface{} = SetWeightAndVerifyWeightArgs{ + var args any = SetWeightAndVerifyWeightArgs{ Rollout: *rollout, DesiredWeight: desiredWeight, AdditionalDestinations: additionalDestinations, @@ -161,7 +161,7 @@ func (g *TrafficRouterPluginRPC) VerifyWeight(rollout *v1alpha1.Rollout, desired // RemoveAllRoutes Removes all routes that are managed by rollouts by looking at spec.strategy.canary.trafficRouting.managedRoutes func (g *TrafficRouterPluginRPC) RemoveManagedRoutes(rollout *v1alpha1.Rollout) types.RpcError { var resp types.RpcError - var args interface{} = RemoveManagedRoutesArgs{ + var args any = RemoveManagedRoutesArgs{ Rollout: *rollout, } err := g.client.Call("Plugin.RemoveManagedRoutes", &args, &resp) @@ -180,13 +180,13 @@ type TrafficRouterRPCServer struct { // InitPlugin this is the server aka the controller side function that receives calls from the client side rpc (controller) // this gets called once during startup of the plugin and can be used to set up informers or k8s clients etc. -func (s *TrafficRouterRPCServer) InitPlugin(args interface{}, resp *types.RpcError) error { +func (s *TrafficRouterRPCServer) InitPlugin(args any, resp *types.RpcError) error { *resp = s.Impl.InitPlugin() return nil } // UpdateHash informs a traffic routing reconciler about new canary, stable, and additionalDestination(s) pod hashes -func (s *TrafficRouterRPCServer) UpdateHash(args interface{}, resp *types.RpcError) error { +func (s *TrafficRouterRPCServer) UpdateHash(args any, resp *types.RpcError) error { runArgs, ok := args.(*UpdateHashArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -196,7 +196,7 @@ func (s *TrafficRouterRPCServer) UpdateHash(args interface{}, resp *types.RpcErr } // SetWeight sets the canary weight to the desired weight -func (s *TrafficRouterRPCServer) SetWeight(args interface{}, resp *types.RpcError) error { +func (s *TrafficRouterRPCServer) SetWeight(args any, resp *types.RpcError) error { setWeigthArgs, ok := args.(*SetWeightAndVerifyWeightArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -206,7 +206,7 @@ func (s *TrafficRouterRPCServer) SetWeight(args interface{}, resp *types.RpcErro } // SetHeaderRoute sets the header routing step -func (s *TrafficRouterRPCServer) SetHeaderRoute(args interface{}, resp *types.RpcError) error { +func (s *TrafficRouterRPCServer) SetHeaderRoute(args any, resp *types.RpcError) error { setHeaderArgs, ok := args.(*SetHeaderArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -216,7 +216,7 @@ func (s *TrafficRouterRPCServer) SetHeaderRoute(args interface{}, resp *types.Rp } // SetMirrorRoute sets up the traffic router to mirror traffic to a service -func (s *TrafficRouterRPCServer) SetMirrorRoute(args interface{}, resp *types.RpcError) error { +func (s *TrafficRouterRPCServer) SetMirrorRoute(args any, resp *types.RpcError) error { setMirrorArgs, ok := args.(*SetMirrorArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -226,14 +226,14 @@ func (s *TrafficRouterRPCServer) SetMirrorRoute(args interface{}, resp *types.Rp } // Type returns the type of the traffic routing reconciler -func (s *TrafficRouterRPCServer) Type(args interface{}, resp *string) error { +func (s *TrafficRouterRPCServer) Type(args any, resp *string) error { *resp = s.Impl.Type() return nil } // VerifyWeight returns true if the canary is at the desired weight and additionalDestinations are at the weights specified // Returns nil if weight verification is not supported or not applicable -func (s *TrafficRouterRPCServer) VerifyWeight(args interface{}, resp *VerifyWeightResponse) error { +func (s *TrafficRouterRPCServer) VerifyWeight(args any, resp *VerifyWeightResponse) error { verifyWeightArgs, ok := args.(*SetWeightAndVerifyWeightArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -247,7 +247,7 @@ func (s *TrafficRouterRPCServer) VerifyWeight(args interface{}, resp *VerifyWeig } // RemoveAllRoutes Removes all routes that are managed by rollouts by looking at spec.strategy.canary.trafficRouting.managedRoutes -func (s *TrafficRouterRPCServer) RemoveManagedRoutes(args interface{}, resp *types.RpcError) error { +func (s *TrafficRouterRPCServer) RemoveManagedRoutes(args any, resp *types.RpcError) error { removeManagedRoutesArgs, ok := args.(*RemoveManagedRoutesArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -271,10 +271,10 @@ type RpcTrafficRouterPlugin struct { Impl TrafficRouterPlugin } -func (p *RpcTrafficRouterPlugin) Server(*plugin.MuxBroker) (interface{}, error) { +func (p *RpcTrafficRouterPlugin) Server(*plugin.MuxBroker) (any, error) { return &TrafficRouterRPCServer{Impl: p.Impl}, nil } -func (RpcTrafficRouterPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error) { +func (RpcTrafficRouterPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (any, error) { return &TrafficRouterPluginRPC{client: c}, nil } diff --git a/rollout/trafficrouting/traefik/mocks/traefik.go b/rollout/trafficrouting/traefik/mocks/traefik.go index aedfd659cd..b0cd361809 100644 --- a/rollout/trafficrouting/traefik/mocks/traefik.go +++ b/rollout/trafficrouting/traefik/mocks/traefik.go @@ -35,10 +35,10 @@ var ( ErrorTraefikServiceObj *unstructured.Unstructured ) -func (f *FakeRecorder) Eventf(object runtime.Object, opts argoRecord.EventOptions, messageFmt string, args ...interface{}) { +func (f *FakeRecorder) Eventf(object runtime.Object, opts argoRecord.EventOptions, messageFmt string, args ...any) { } -func (f *FakeRecorder) Warnf(object runtime.Object, opts argoRecord.EventOptions, messageFmt string, args ...interface{}) { +func (f *FakeRecorder) Warnf(object runtime.Object, opts argoRecord.EventOptions, messageFmt string, args ...any) { } func (f *FakeRecorder) K8sRecorder() record.EventRecorder { diff --git a/rollout/trafficrouting/traefik/traefik.go b/rollout/trafficrouting/traefik/traefik.go index f5b507207f..5840bf4a42 100644 --- a/rollout/trafficrouting/traefik/traefik.go +++ b/rollout/trafficrouting/traefik/traefik.go @@ -134,10 +134,10 @@ func (r *Reconciler) SetWeight(desiredWeight int32, additionalDestinations ...v1 return err } -func getService(serviceName string, services []interface{}) (map[string]interface{}, error) { - var selectedService map[string]interface{} +func getService(serviceName string, services []any) (map[string]any, error) { + var selectedService map[string]any for _, service := range services { - typedService, ok := service.(map[string]interface{}) + typedService, ok := service.(map[string]any) if !ok { return nil, errors.New("Failed type assertion setting weight for traefik service") } diff --git a/rollout/trafficrouting/traefik/traefik_test.go b/rollout/trafficrouting/traefik/traefik_test.go index d7dbbbd297..892468df0a 100644 --- a/rollout/trafficrouting/traefik/traefik_test.go +++ b/rollout/trafficrouting/traefik/traefik_test.go @@ -305,7 +305,7 @@ func TestGetService(t *testing.T) { t.Run("ErrorGetServiceFromStruct ", func(t *testing.T) { // Given t.Parallel() - services := []interface{}{ + services := []any{ mocks.FakeService{Weight: 12}, } @@ -319,12 +319,12 @@ func TestGetService(t *testing.T) { t.Run("ErrorGetServiceFromMap", func(t *testing.T) { // Given t.Parallel() - services := map[string]interface{}{ + services := map[string]any{ "weight": 100, } // When - selectedServices, err := getService("default", []interface{}{services}) + selectedServices, err := getService("default", []any{services}) // Then assert.Nil(t, selectedServices) @@ -334,12 +334,12 @@ func TestGetService(t *testing.T) { // Given t.Parallel() const serviceName string = "default" - services := map[string]interface{}{ + services := map[string]any{ "name": serviceName, } // When - selectedServices, err := getService(serviceName, []interface{}{services}) + selectedServices, err := getService(serviceName, []any{services}) // Then assert.NotNil(t, selectedServices) @@ -348,12 +348,12 @@ func TestGetService(t *testing.T) { t.Run("ErrorGetServiceFromNil", func(t *testing.T) { // Given t.Parallel() - services := map[string]interface{}{ + services := map[string]any{ "name": nil, } // When - selectedServices, err := getService("default", []interface{}{services}) + selectedServices, err := getService("default", []any{services}) // Then assert.Nil(t, selectedServices) diff --git a/rollout/trafficrouting_test.go b/rollout/trafficrouting_test.go index 21aea362ae..78817492f6 100644 --- a/rollout/trafficrouting_test.go +++ b/rollout/trafficrouting_test.go @@ -121,7 +121,7 @@ func TestReconcileTrafficRoutingVerifyWeightFalse(t *testing.T) { f.fakeTrafficRouting.On("VerifyWeight", mock.Anything).Return(pointer.BoolPtr(false), nil) c, i, k8sI := f.newController(noResyncPeriodFunc) enqueued := false - c.enqueueRolloutAfter = func(obj interface{}, duration time.Duration) { + c.enqueueRolloutAfter = func(obj any, duration time.Duration) { enqueued = true } f.expectPatchRolloutAction(ro) diff --git a/server/server.go b/server/server.go index cbb742333d..3482634491 100644 --- a/server/server.go +++ b/server/server.go @@ -290,15 +290,15 @@ func (s *ArgoRolloutsServer) WatchRolloutInfos(q *rollout.RolloutInfoListQuery, rolloutUpdateChan := make(chan *v1alpha1.Rollout) rolloutInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { rolloutUpdateChan <- obj.(*v1alpha1.Rollout) }, - UpdateFunc: func(oldObj, newObj interface{}) { + UpdateFunc: func(oldObj, newObj any) { rolloutUpdateChan <- newObj.(*v1alpha1.Rollout) }, }) podsInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{ - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { podUpdated(obj.(*corev1.Pod), rsLister, rolloutsLister, rolloutUpdateChan) }, }) diff --git a/service/service.go b/service/service.go index f81c82c771..be143de83d 100644 --- a/service/service.go +++ b/service/service.go @@ -82,7 +82,7 @@ type Controller struct { resyncPeriod time.Duration metricServer *metrics.MetricsServer - enqueueRollout func(obj interface{}) + enqueueRollout func(obj any) } // NewController returns a new service controller @@ -103,7 +103,7 @@ func NewController(cfg ControllerConfig) *Controller { } util.CheckErr(cfg.RolloutsInformer.Informer().AddIndexers(cache.Indexers{ - serviceIndexName: func(obj interface{}) (strings []string, e error) { + serviceIndexName: func(obj any) (strings []string, e error) { if ro := unstructuredutil.ObjectToRollout(obj); ro != nil { return serviceutil.GetRolloutServiceKeys(ro), nil } @@ -112,17 +112,17 @@ func NewController(cfg ControllerConfig) *Controller { })) cfg.ServicesInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { controllerutil.Enqueue(obj, cfg.ServiceWorkqueue) }, - UpdateFunc: func(oldObj, newObj interface{}) { + UpdateFunc: func(oldObj, newObj any) { controllerutil.Enqueue(newObj, cfg.ServiceWorkqueue) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { controllerutil.Enqueue(obj, cfg.ServiceWorkqueue) }, }) - controller.enqueueRollout = func(obj interface{}) { + controller.enqueueRollout = func(obj any) { controllerutil.EnqueueRateLimited(obj, cfg.RolloutWorkqueue) } diff --git a/service/service_test.go b/service/service_test.go index 69dea462da..35722443ac 100644 --- a/service/service_test.go +++ b/service/service_test.go @@ -86,7 +86,7 @@ func newFakeServiceController(svc *corev1.Service, rollout *v1alpha1.Rollout) (* MetricsServer: metricsServer, }) enqueuedObjects := map[string]int{} - c.enqueueRollout = func(obj interface{}) { + c.enqueueRollout = func(obj any) { var key string var err error if key, err = cache.MetaNamespaceKeyFunc(obj); err != nil { diff --git a/test/e2e/apisix_test.go b/test/e2e/apisix_test.go index 1c8d2de3a3..dfdea9ce60 100644 --- a/test/e2e/apisix_test.go +++ b/test/e2e/apisix_test.go @@ -4,13 +4,14 @@ package e2e import ( + "testing" + "time" + a6 "github.com/argoproj/argo-rollouts/rollout/trafficrouting/apisix" "github.com/argoproj/argo-rollouts/test/fixtures" "github.com/stretchr/testify/suite" "github.com/tj/assert" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "testing" - "time" ) const ( @@ -132,7 +133,7 @@ func (s *APISIXSuite) check(t *fixtures.Then, stableWeight int64, canaryWeight i assert.NoError(s.T(), err) for _, backend := range backends { - typedBackend, ok := backend.(map[string]interface{}) + typedBackend, ok := backend.(map[string]any) assert.Equal(s.T(), ok, true) nameOfCurrentBackend, isFound, err := unstructured.NestedString(typedBackend, "serviceName") assert.NoError(s.T(), err) @@ -165,14 +166,14 @@ func (s *APISIXSuite) checkSetHeader(t *fixtures.Then, stableWeight int64, canar apisixHttpRouteObj, err := a6.GetHttpRoute(apisixHttpRoutesObj, apisixRouteName) assert.NoError(s.T(), err) - exprs, isFound, err := unstructured.NestedSlice(apisixHttpRouteObj.(map[string]interface{}), "match", "exprs") + exprs, isFound, err := unstructured.NestedSlice(apisixHttpRouteObj.(map[string]any), "match", "exprs") assert.NoError(s.T(), err) assert.Equal(s.T(), isFound, true) assert.Equal(s.T(), 1, len(exprs)) expr := exprs[0] - exprObj, ok := expr.(map[string]interface{}) + exprObj, ok := expr.(map[string]any) assert.Equal(s.T(), ok, true) op, isFound, err := unstructured.NestedString(exprObj, "op") diff --git a/test/e2e/appmesh_test.go b/test/e2e/appmesh_test.go index f7936d24d1..4d173e8c56 100644 --- a/test/e2e/appmesh_test.go +++ b/test/e2e/appmesh_test.go @@ -72,12 +72,12 @@ func (s *AppMeshSuite) getWeightedTargets(uVr *unstructured.Unstructured) map[st result := make(map[string]weightedTargets) routesI, _, _ := unstructured.NestedSlice(uVr.Object, "spec", "routes") for _, rI := range routesI { - route, _ := rI.(map[string]interface{}) + route, _ := rI.(map[string]any) routeName, _ := route["name"].(string) wtsI, _, _ := unstructured.NestedSlice(route, "httpRoute", "action", "weightedTargets") wtStruct := weightedTargets{} for _, wtI := range wtsI { - wt, _ := wtI.(map[string]interface{}) + wt, _ := wtI.(map[string]any) vnodeName, _, _ := unstructured.NestedString(wt, "virtualNodeRef", "name") weight, _, _ := unstructured.NestedInt64(wt, "weight") fmt.Printf("Found wt %+v with vnodeName (%s), weight (%d)", wt, vnodeName, weight) diff --git a/test/e2e/functional_test.go b/test/e2e/functional_test.go index d4b27d3e3f..e6aff1477f 100644 --- a/test/e2e/functional_test.go +++ b/test/e2e/functional_test.go @@ -1313,7 +1313,7 @@ spec: if err != nil { return err } - containers[0] = map[string]interface{}{ + containers[0] = map[string]any{ "name": "rollouts-demo", "image": "argoproj/rollouts-demo:error", } @@ -1333,7 +1333,7 @@ spec: if err != nil { return err } - containers[0] = map[string]interface{}{ + containers[0] = map[string]any{ "name": "rollouts-demo", "image": "argoproj/rollouts-demo:blue", } diff --git a/test/fixtures/given.go b/test/fixtures/given.go index 19e7552f60..57e17251c6 100644 --- a/test/fixtures/given.go +++ b/test/fixtures/given.go @@ -44,7 +44,7 @@ func (g *Given) SetSteps(text string) *Given { steps := make([]rov1.CanaryStep, 0) err := yaml.Unmarshal([]byte(text), &steps) g.CheckError(err) - var stepsUn []interface{} + var stepsUn []any for _, step := range steps { stepUn, err := runtime.DefaultUnstructuredConverter.ToUnstructured(&step) g.CheckError(err) diff --git a/test/fixtures/then.go b/test/fixtures/then.go index eac4c9419b..c41c14d92a 100644 --- a/test/fixtures/then.go +++ b/test/fixtures/then.go @@ -54,7 +54,7 @@ func (t *Then) ExpectRolloutStatus(expectedStatus string) *Then { return t } -func (t *Then) ExpectReplicaCounts(desired, current, updated, ready, available interface{}) *Then { +func (t *Then) ExpectReplicaCounts(desired, current, updated, ready, available any) *Then { ro, err := t.rolloutClient.ArgoprojV1alpha1().Rollouts(t.namespace).Get(t.Context, t.rollout.GetName(), metav1.GetOptions{}) t.CheckError(err) if desired != nil && desired.(int) != int(defaults.GetReplicasOrDefault(ro.Spec.Replicas)) { diff --git a/test/fixtures/when.go b/test/fixtures/when.go index 82e84d3a42..395e614bcf 100644 --- a/test/fixtures/when.go +++ b/test/fixtures/when.go @@ -88,7 +88,7 @@ func (w *When) injectDelays(un *unstructured.Unstructured) { w.CheckError(err) containersIf, _, err := unstructured.NestedSlice(un.Object, "spec", "template", "spec", "containers") w.CheckError(err) - container := containersIf[0].(map[string]interface{}) + container := containersIf[0].(map[string]any) container["lifecycle"] = lifecycleObj containersIf[0] = container err = unstructured.SetNestedSlice(un.Object, containersIf, "spec", "template", "spec", "containers") @@ -103,7 +103,7 @@ func (w *When) injectImagePrefix(un *unstructured.Unstructured) { } containersIf, _, err := unstructured.NestedSlice(un.Object, "spec", "template", "spec", "containers") w.CheckError(err) - container := containersIf[0].(map[string]interface{}) + container := containersIf[0].(map[string]any) container["image"] = imagePrefix + container["image"].(string) containersIf[0] = container err = unstructured.SetNestedSlice(un.Object, containersIf, "spec", "template", "spec", "containers") @@ -233,7 +233,7 @@ func (w *When) PatchSpec(patch string) *When { w.t.Fatal("Rollout not set") } // convert YAML patch to JSON patch - var patchObj map[string]interface{} + var patchObj map[string]any err := yaml.Unmarshal([]byte(patch), &patchObj) w.CheckError(err) jsonPatch, err := json.Marshal(patchObj) diff --git a/test/util/util.go b/test/util/util.go index 071aca3f7b..5f5c20d5c7 100644 --- a/test/util/util.go +++ b/test/util/util.go @@ -16,7 +16,7 @@ import ( // ObjectFromYAML returns a runtime.Object from a yaml string func ObjectFromYAML(yamlStr string) *unstructured.Unstructured { - obj := make(map[string]interface{}) + obj := make(map[string]any) err := yaml.Unmarshal([]byte(yamlStr), &obj) if err != nil { panic(err) diff --git a/utils/analysis/factory.go b/utils/analysis/factory.go index 278f24a19a..0e17e587a7 100644 --- a/utils/analysis/factory.go +++ b/utils/analysis/factory.go @@ -243,7 +243,7 @@ func ValidateMetric(metric v1alpha1.Metric) error { func extractValueFromRollout(r *v1alpha1.Rollout, path string) (string, error) { j, _ := json.Marshal(r) - m := interface{}(nil) + m := any(nil) json.Unmarshal(j, &m) sections := regexp.MustCompile("[\\.\\[\\]]+").Split(path, -1) for _, section := range sections { @@ -251,7 +251,7 @@ func extractValueFromRollout(r *v1alpha1.Rollout, path string) (string, error) { continue // if path ends with a separator char, Split returns an empty last section } - if asArray, ok := m.([]interface{}); ok { + if asArray, ok := m.([]any); ok { if i, err := strconv.Atoi(section); err != nil { return "", fmt.Errorf("invalid index '%s'", section) } else if i >= len(asArray) { @@ -259,7 +259,7 @@ func extractValueFromRollout(r *v1alpha1.Rollout, path string) (string, error) { } else { m = asArray[i] } - } else if asMap, ok := m.(map[string]interface{}); ok { + } else if asMap, ok := m.(map[string]any); ok { m = asMap[section] } else { return "", fmt.Errorf("invalid path %s in rollout", path) @@ -271,8 +271,8 @@ func extractValueFromRollout(r *v1alpha1.Rollout, path string) (string, error) { } var isArray, isMap bool - _, isArray = m.([]interface{}) - _, isMap = m.(map[string]interface{}) + _, isArray = m.([]any) + _, isMap = m.(map[string]any) if isArray || isMap { return "", fmt.Errorf("path %s in rollout must terminate in a primitive value", path) } diff --git a/utils/analysis/helpers.go b/utils/analysis/helpers.go index caedeb472c..6e95bd47fa 100644 --- a/utils/analysis/helpers.go +++ b/utils/analysis/helpers.go @@ -541,9 +541,9 @@ func NewAnalysisRunFromUnstructured(obj *unstructured.Unstructured, templateArgs } // Set args - newArgVals := []interface{}{} + newArgVals := []any{} for i := 0; i < len(newArgs); i++ { - var newArgInterface map[string]interface{} + var newArgInterface map[string]any newArgBytes, err := json.Marshal(newArgs[i]) if err != nil { return nil, err diff --git a/utils/analysis/helpers_test.go b/utils/analysis/helpers_test.go index 3fbefadce4..207f5fa023 100644 --- a/utils/analysis/helpers_test.go +++ b/utils/analysis/helpers_test.go @@ -822,7 +822,7 @@ func TestNewAnalysisRunFromUnstructured(t *testing.T) { assert.Equal(t, len(args), len(arArgs)) for i, arg := range arArgs { - argnv := arg.(map[string]interface{}) + argnv := arg.(map[string]any) assert.Equal(t, *args[i].Value, argnv["value"]) } } diff --git a/utils/aws/aws.go b/utils/aws/aws.go index b8884a0589..42b4907836 100644 --- a/utils/aws/aws.go +++ b/utils/aws/aws.go @@ -300,7 +300,7 @@ func GetTargetGroupBindingsByService(ctx context.Context, dynamicClient dynamic. return tgbs, nil } -func toTargetGroupBinding(obj map[string]interface{}) (*TargetGroupBinding, error) { +func toTargetGroupBinding(obj map[string]any) (*TargetGroupBinding, error) { data, err := json.Marshal(obj) if err != nil { return nil, err @@ -368,7 +368,7 @@ func VerifyTargetGroupBinding(ctx context.Context, logCtx *log.Entry, awsClnt Cl logCtx.Warn("Unable to match TargetGroupBinding spec.serviceRef.port to Service spec.ports") return nil, nil } - logCtx = logCtx.WithFields(map[string]interface{}{ + logCtx = logCtx.WithFields(map[string]any{ "service": svc.Name, "targetgroupbinding": tgb.Name, "tg": tgb.Spec.TargetGroupARN, diff --git a/utils/controller/controller.go b/utils/controller/controller.go index 63aa6f11cd..36ebfa9088 100644 --- a/utils/controller/controller.go +++ b/utils/controller/controller.go @@ -115,7 +115,7 @@ func processNextWorkItem(ctx context.Context, workqueue workqueue.RateLimitingIn } // We wrap this block in a func so we can defer c.workqueue.Done. - err := func(obj interface{}) error { + err := func(obj any) error { // We call Done here so the workqueue knows we have finished // processing this item. We also must remember to call Forget if we // do not want this work item being re-queued. For example, we do @@ -179,14 +179,14 @@ func processNextWorkItem(ctx context.Context, workqueue workqueue.RateLimitingIn } // metaNamespaceKeyFunc is a wrapper around cache.MetaNamespaceKeyFunc but also accepts strings -func metaNamespaceKeyFunc(obj interface{}) (string, error) { +func metaNamespaceKeyFunc(obj any) (string, error) { if objStr, ok := obj.(string); ok { obj = cache.ExplicitKey(objStr) } return cache.MetaNamespaceKeyFunc(obj) } -func Enqueue(obj interface{}, q workqueue.RateLimitingInterface) { +func Enqueue(obj any, q workqueue.RateLimitingInterface) { var key string var err error if key, err = metaNamespaceKeyFunc(obj); err != nil { @@ -196,7 +196,7 @@ func Enqueue(obj interface{}, q workqueue.RateLimitingInterface) { q.Add(key) } -func EnqueueAfter(obj interface{}, duration time.Duration, q workqueue.RateLimitingInterface) { +func EnqueueAfter(obj any, duration time.Duration, q workqueue.RateLimitingInterface) { var key string var err error if key, err = metaNamespaceKeyFunc(obj); err != nil { @@ -206,7 +206,7 @@ func EnqueueAfter(obj interface{}, duration time.Duration, q workqueue.RateLimit q.AddAfter(key, duration) } -func EnqueueRateLimited(obj interface{}, q workqueue.RateLimitingInterface) { +func EnqueueRateLimited(obj any, q workqueue.RateLimitingInterface) { var key string var err error if key, err = metaNamespaceKeyFunc(obj); err != nil { @@ -222,7 +222,7 @@ func EnqueueRateLimited(obj interface{}, q workqueue.RateLimitingInterface) { // It then enqueues that ownerType resource to be processed. If the object does not // have an appropriate OwnerReference, it will simply be skipped. // This function assumes parent object is in the same namespace as the child -func EnqueueParentObject(obj interface{}, ownerType string, enqueue func(obj interface{})) { +func EnqueueParentObject(obj any, ownerType string, enqueue func(obj any)) { var object metav1.Object var ok bool if object, ok = obj.(metav1.Object); !ok { diff --git a/utils/controller/controller_test.go b/utils/controller/controller_test.go index 9fa54b5517..3761d05ba5 100644 --- a/utils/controller/controller_test.go +++ b/utils/controller/controller_test.go @@ -169,7 +169,7 @@ func TestEnqueueParentObjectInvalidObject(t *testing.T) { errorMessages = append(errorMessages, err) }) invalidObject := "invalid-object" - enqueueFunc := func(obj interface{}) {} + enqueueFunc := func(obj any) {} EnqueueParentObject(invalidObject, register.RolloutKind, enqueueFunc) assert.Len(t, errorMessages, 1) assert.Error(t, errorMessages[0], "error decoding object, invalid type") @@ -182,7 +182,7 @@ func TestEnqueueParentObjectInvalidTombstoneObject(t *testing.T) { }) invalidObject := cache.DeletedFinalStateUnknown{} - enqueueFunc := func(obj interface{}) {} + enqueueFunc := func(obj any) {} EnqueueParentObject(invalidObject, register.RolloutKind, enqueueFunc) assert.Len(t, errorMessages, 1) assert.Equal(t, "error decoding object tombstone, invalid type", errorMessages[0]) @@ -199,8 +199,8 @@ func TestEnqueueParentObjectNoOwner(t *testing.T) { Namespace: "default", }, } - enqueuedObjs := make([]interface{}, 0) - enqueueFunc := func(obj interface{}) { + enqueuedObjs := make([]any, 0) + enqueueFunc := func(obj any) { enqueuedObjs = append(enqueuedObjs, obj) } EnqueueParentObject(rs, register.RolloutKind, enqueueFunc) @@ -228,8 +228,8 @@ func TestEnqueueParentObjectDifferentOwnerKind(t *testing.T) { OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(experiment, experimentKind)}, }, } - enqueuedObjs := make([]interface{}, 0) - enqueueFunc := func(obj interface{}) { + enqueuedObjs := make([]any, 0) + enqueueFunc := func(obj any) { enqueuedObjs = append(enqueuedObjs, obj) } EnqueueParentObject(rs, register.RolloutKind, enqueueFunc) @@ -257,8 +257,8 @@ func TestEnqueueParentObjectOtherOwnerTypes(t *testing.T) { OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(deployment, deploymentKind)}, }, } - enqueuedObjs := make([]interface{}, 0) - enqueueFunc := func(obj interface{}) { + enqueuedObjs := make([]any, 0) + enqueueFunc := func(obj any) { enqueuedObjs = append(enqueuedObjs, obj) } EnqueueParentObject(rs, "Deployment", enqueueFunc) @@ -286,8 +286,8 @@ func TestEnqueueParentObjectEnqueueExperiment(t *testing.T) { OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(experiment, experimentKind)}, }, } - enqueuedObjs := make([]interface{}, 0) - enqueueFunc := func(obj interface{}) { + enqueuedObjs := make([]any, 0) + enqueueFunc := func(obj any) { enqueuedObjs = append(enqueuedObjs, obj) } client := fake.NewSimpleClientset(experiment) @@ -319,8 +319,8 @@ func TestEnqueueParentObjectEnqueueRollout(t *testing.T) { OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(rollout, rolloutKind)}, }, } - enqueuedObjs := make([]interface{}, 0) - enqueueFunc := func(obj interface{}) { + enqueuedObjs := make([]any, 0) + enqueueFunc := func(obj any) { enqueuedObjs = append(enqueuedObjs, obj) } client := fake.NewSimpleClientset(rollout) @@ -356,8 +356,8 @@ func TestEnqueueParentObjectRecoverTombstoneObject(t *testing.T) { Obj: rs, } - enqueuedObjs := make([]interface{}, 0) - enqueueFunc := func(obj interface{}) { + enqueuedObjs := make([]any, 0) + enqueueFunc := func(obj any) { enqueuedObjs = append(enqueuedObjs, obj) } client := fake.NewSimpleClientset(experiment) @@ -388,10 +388,10 @@ func TestInstanceIDRequirement(t *testing.T) { } func newObj(name, kind, apiVersion string) *unstructured.Unstructured { - obj := make(map[string]interface{}) + obj := make(map[string]any) obj["apiVersion"] = apiVersion obj["kind"] = kind - obj["metadata"] = map[string]interface{}{ + obj["metadata"] = map[string]any{ "name": name, "namespace": metav1.NamespaceDefault, } @@ -437,7 +437,7 @@ func TestProcessNextWatchObj(t *testing.T) { dInformer := dynamicinformers.NewDynamicSharedInformerFactory(client, func() time.Duration { return 0 }()) indexer := dInformer.ForResource(gvk).Informer().GetIndexer() indexer.AddIndexers(cache.Indexers{ - "testIndexer": func(obj interface{}) (strings []string, e error) { + "testIndexer": func(obj any) (strings []string, e error) { return []string{"default/foo"}, nil }, }) diff --git a/utils/diff/diff.go b/utils/diff/diff.go index 458afe4654..12ac705070 100644 --- a/utils/diff/diff.go +++ b/utils/diff/diff.go @@ -7,7 +7,7 @@ import ( ) // CreateTwoWayMergePatch is a helper to construct a two-way merge patch from objects (instead of bytes) -func CreateTwoWayMergePatch(orig, new, dataStruct interface{}) ([]byte, bool, error) { +func CreateTwoWayMergePatch(orig, new, dataStruct any) ([]byte, bool, error) { origBytes, err := json.Marshal(orig) if err != nil { return nil, false, err diff --git a/utils/evaluate/evaluate.go b/utils/evaluate/evaluate.go index b725d99c0f..a2c9a607cd 100644 --- a/utils/evaluate/evaluate.go +++ b/utils/evaluate/evaluate.go @@ -14,7 +14,7 @@ import ( "github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1" ) -func EvaluateResult(result interface{}, metric v1alpha1.Metric, logCtx logrus.Entry) (v1alpha1.AnalysisPhase, error) { +func EvaluateResult(result any, metric v1alpha1.Metric, logCtx logrus.Entry) (v1alpha1.AnalysisPhase, error) { successCondition := false failCondition := false var err error @@ -57,10 +57,10 @@ func EvaluateResult(result interface{}, metric v1alpha1.Metric, logCtx logrus.En } // EvalCondition evaluates the condition with the resultValue as an input -func EvalCondition(resultValue interface{}, condition string) (bool, error) { +func EvalCondition(resultValue any, condition string) (bool, error) { var err error - env := map[string]interface{}{ + env := map[string]any{ "result": valueFromPointer(resultValue), "asInt": asInt, "asFloat": asFloat, @@ -99,7 +99,7 @@ func isInf(f float64) bool { return math.IsInf(f, 0) } -func asInt(in interface{}) int64 { +func asInt(in any) int64 { switch i := in.(type) { case float64: return int64(i) @@ -135,7 +135,7 @@ func asInt(in interface{}) int64 { panic(fmt.Sprintf("asInt() not supported on %v %v", reflect.TypeOf(in), in)) } -func asFloat(in interface{}) float64 { +func asFloat(in any) float64 { switch i := in.(type) { case float64: return i @@ -188,8 +188,8 @@ func Equal(a, b []string) bool { return true } -func defaultFunc(resultValue interface{}) func(interface{}, interface{}) interface{} { - return func(_ interface{}, defaultValue interface{}) interface{} { +func defaultFunc(resultValue any) func(any, any) any { + return func(_ any, defaultValue any) any { if isNil(resultValue) { return defaultValue } @@ -197,14 +197,14 @@ func defaultFunc(resultValue interface{}) func(interface{}, interface{}) interfa } } -func isNilFunc(resultValue interface{}) func(interface{}) bool { - return func(_ interface{}) bool { +func isNilFunc(resultValue any) func(any) bool { + return func(_ any) bool { return isNil(resultValue) } } // isNil is courtesy of: https://gist.github.com/mangatmodi/06946f937cbff24788fa1d9f94b6b138 -func isNil(in interface{}) (out bool) { +func isNil(in any) (out bool) { if in == nil { out = true return @@ -220,7 +220,7 @@ func isNil(in interface{}) (out bool) { // valueFromPointer allows pointers to be passed in from the provider, but then extracts the value from // the pointer if the pointer is not nil, else returns nil -func valueFromPointer(in interface{}) (out interface{}) { +func valueFromPointer(in any) (out any) { if isNil(in) { return } diff --git a/utils/evaluate/evaluate_test.go b/utils/evaluate/evaluate_test.go index e058d2aa4b..7839e47256 100644 --- a/utils/evaluate/evaluate_test.go +++ b/utils/evaluate/evaluate_test.go @@ -126,11 +126,11 @@ func TestErrorWithInvalidReference(t *testing.T) { } func TestEvaluateArray(t *testing.T) { - floats := map[string]interface{}{ - "service_apdex": map[string]interface{}{ + floats := map[string]any{ + "service_apdex": map[string]any{ "label": nil, - "values": map[string]interface{}{ - "values": []interface{}{float64(2), float64(2)}, + "values": map[string]any{ + "values": []any{float64(2), float64(2)}, }, }, } @@ -169,7 +169,7 @@ func TestEvaluateAsIntPanic(t *testing.T) { func TestEvaluateAsInt(t *testing.T) { tests := []struct { - input interface{} + input any expression string expectation bool }{ @@ -186,7 +186,7 @@ func TestEvaluateAsInt(t *testing.T) { func TestEvaluateAsFloatError(t *testing.T) { tests := []struct { - input interface{} + input any expression string errRegexp string }{ @@ -203,7 +203,7 @@ func TestEvaluateAsFloatError(t *testing.T) { func TestEvaluateAsFloat(t *testing.T) { tests := []struct { - input interface{} + input any expression string expectation bool }{ diff --git a/utils/json/json.go b/utils/json/json.go index d946ff4621..96b2a3f7c7 100644 --- a/utils/json/json.go +++ b/utils/json/json.go @@ -10,7 +10,7 @@ import ( // MustMarshal marshals an object and panics if it failures. This function should only be used // when the object being passed in does not have any chance of failing (i.e. you constructed // the object yourself) -func MustMarshal(i interface{}) []byte { +func MustMarshal(i any) []byte { bytes, err := json.Marshal(i) if err != nil { panic(err) @@ -27,7 +27,7 @@ func (j *JSONMarshaler) ContentType() string { } // Marshal implements gwruntime.Marshaler. -func (j *JSONMarshaler) Marshal(v interface{}) ([]byte, error) { +func (j *JSONMarshaler) Marshal(v any) ([]byte, error) { return json.Marshal(v) } @@ -42,6 +42,6 @@ func (j *JSONMarshaler) NewEncoder(w io.Writer) gwruntime.Encoder { } // Unmarshal implements gwruntime.Marshaler. -func (j *JSONMarshaler) Unmarshal(data []byte, v interface{}) error { +func (j *JSONMarshaler) Unmarshal(data []byte, v any) error { return json.Unmarshal(data, v) } diff --git a/utils/json/json_test.go b/utils/json/json_test.go index 2b3b734963..1f3a18e19f 100644 --- a/utils/json/json_test.go +++ b/utils/json/json_test.go @@ -23,7 +23,7 @@ type I interface { } func TestMustMarshalPanics(t *testing.T) { - test := map[string]interface{}{ + test := map[string]any{ "foo": make(chan int), } assert.Panics(t, func() { MustMarshal(test) }) diff --git a/utils/log/log.go b/utils/log/log.go index 049f26f935..86a391fd2e 100644 --- a/utils/log/log.go +++ b/utils/log/log.go @@ -74,7 +74,7 @@ func WithObject(obj runtime.Object) *log.Entry { // This is an optimization that callers can use to avoid inferring this again from a runtime.Object func KindNamespaceName(logCtx *log.Entry) (string, string, string) { var kind string - var nameIf interface{} + var nameIf any var ok bool if nameIf, ok = logCtx.Data["rollout"]; ok { kind = "Rollout" @@ -118,7 +118,7 @@ func WithRedactor(entry log.Entry, secrets []string) *log.Entry { } func WithVersionFields(entry *log.Entry, r *v1alpha1.Rollout) *log.Entry { - return entry.WithFields(map[string]interface{}{ + return entry.WithFields(map[string]any{ "resourceVersion": r.ResourceVersion, "generation": r.Generation, }) diff --git a/utils/record/record.go b/utils/record/record.go index 87d83092f7..d2bd322acf 100644 --- a/utils/record/record.go +++ b/utils/record/record.go @@ -58,8 +58,8 @@ type EventOptions struct { } type EventRecorder interface { - Eventf(object runtime.Object, opts EventOptions, messageFmt string, args ...interface{}) - Warnf(object runtime.Object, opts EventOptions, messageFmt string, args ...interface{}) + Eventf(object runtime.Object, opts EventOptions, messageFmt string, args ...any) + Warnf(object runtime.Object, opts EventOptions, messageFmt string, args ...any) K8sRecorder() record.EventRecorder } @@ -75,7 +75,7 @@ type EventRecorderAdapter struct { NotificationSuccessCounter *prometheus.CounterVec NotificationSendPerformance *prometheus.HistogramVec - eventf func(object runtime.Object, warn bool, opts EventOptions, messageFmt string, args ...interface{}) + eventf func(object runtime.Object, warn bool, opts EventOptions, messageFmt string, args ...any) // apiFactory is a notifications engine API factory apiFactory api.Factory } @@ -110,8 +110,8 @@ type FakeEventRecorder struct { func NewFakeApiFactory() api.Factory { var ( settings = api.Settings{ConfigMapName: "my-config-map", SecretName: "my-secret", InitGetVars: func(cfg *api.Config, configMap *corev1.ConfigMap, secret *corev1.Secret) (api.GetVars, error) { - return func(obj map[string]interface{}, dest services.Destination) map[string]interface{} { - return map[string]interface{}{"obj": obj} + return func(obj map[string]any, dest services.Destination) map[string]any { + return map[string]any{"obj": obj} }, nil }} ) @@ -173,7 +173,7 @@ func NewFakeEventRecorder() *FakeEventRecorder { ).(*EventRecorderAdapter) recorder.Recorder = record.NewFakeRecorder(1000) fakeRecorder := &FakeEventRecorder{} - recorder.eventf = func(object runtime.Object, warn bool, opts EventOptions, messageFmt string, args ...interface{}) { + recorder.eventf = func(object runtime.Object, warn bool, opts EventOptions, messageFmt string, args ...any) { recorder.defaultEventf(object, warn, opts, messageFmt, args...) fakeRecorder.Events = append(fakeRecorder.Events, opts.EventReason) } @@ -181,21 +181,21 @@ func NewFakeEventRecorder() *FakeEventRecorder { return fakeRecorder } -func (e *EventRecorderAdapter) Eventf(object runtime.Object, opts EventOptions, messageFmt string, args ...interface{}) { +func (e *EventRecorderAdapter) Eventf(object runtime.Object, opts EventOptions, messageFmt string, args ...any) { if opts.EventType == "" { opts.EventType = corev1.EventTypeNormal } e.eventf(object, opts.EventType == corev1.EventTypeWarning, opts, messageFmt, args...) } -func (e *EventRecorderAdapter) Warnf(object runtime.Object, opts EventOptions, messageFmt string, args ...interface{}) { +func (e *EventRecorderAdapter) Warnf(object runtime.Object, opts EventOptions, messageFmt string, args ...any) { opts.EventType = corev1.EventTypeWarning e.eventf(object, true, opts, messageFmt, args...) } // defaultEventf is the default implementation of eventf, which is able to be overwritten for // test purposes -func (e *EventRecorderAdapter) defaultEventf(object runtime.Object, warn bool, opts EventOptions, messageFmt string, args ...interface{}) { +func (e *EventRecorderAdapter) defaultEventf(object runtime.Object, warn bool, opts EventOptions, messageFmt string, args ...any) { logCtx := logutil.WithObject(object) if opts.EventReason != "" { @@ -240,8 +240,8 @@ func NewAPIFactorySettings() api.Settings { SecretName: NotificationSecret, ConfigMapName: NotificationConfigMap, InitGetVars: func(cfg *api.Config, configMap *corev1.ConfigMap, secret *corev1.Secret) (api.GetVars, error) { - return func(obj map[string]interface{}, dest services.Destination) map[string]interface{} { - return map[string]interface{}{"rollout": obj, "time": timeExprs} + return func(obj map[string]any, dest services.Destination) map[string]any { + return map[string]any{"rollout": obj, "time": timeExprs} }, nil }, } @@ -319,12 +319,12 @@ func hash(input string) string { } // toObjectMap converts an object to a map for the purposes of sending to the notification engine -func toObjectMap(object interface{}) (map[string]interface{}, error) { +func toObjectMap(object any) (map[string]any, error) { objBytes, err := json.Marshal(object) if err != nil { return nil, err } - var objMap map[string]interface{} + var objMap map[string]any err = json.Unmarshal(objBytes, &objMap) if err != nil { return nil, err @@ -338,7 +338,7 @@ func toObjectMap(object interface{}) (map[string]interface{}, error) { if err != nil { return nil, err } - var templateMap map[string]interface{} + var templateMap map[string]any err = json.Unmarshal(templateBytes, &templateMap) if err != nil { return nil, err @@ -352,7 +352,7 @@ func toObjectMap(object interface{}) (map[string]interface{}, error) { if err != nil { return nil, err } - var selectorMap map[string]interface{} + var selectorMap map[string]any err = json.Unmarshal(selectorBytes, &selectorMap) if err != nil { return nil, err @@ -373,7 +373,7 @@ func translateReasonToTrigger(reason string) string { return "on-" + strings.ToLower(trigger) } -var timeExprs = map[string]interface{}{ +var timeExprs = map[string]any{ "Parse": parse, "Now": now, } diff --git a/utils/record/record_test.go b/utils/record/record_test.go index d7e64af1fa..6c494a3ac7 100644 --- a/utils/record/record_test.go +++ b/utils/record/record_test.go @@ -429,10 +429,10 @@ func TestNewAPIFactorySettings(t *testing.T) { getVars, err := settings.InitGetVars(nil, nil, nil) assert.NoError(t, err) - rollout := map[string]interface{}{"name": "hello"} + rollout := map[string]any{"name": "hello"} vars := getVars(rollout, services.Destination{}) - assert.Equal(t, map[string]interface{}{"rollout": rollout, "time": timeExprs}, vars) + assert.Equal(t, map[string]any{"rollout": rollout, "time": timeExprs}, vars) } func TestWorkloadRefObjectMap(t *testing.T) { diff --git a/utils/tolerantinformer/tolerantinformer_test.go b/utils/tolerantinformer/tolerantinformer_test.go index 351601e3a9..84c25c1215 100644 --- a/utils/tolerantinformer/tolerantinformer_test.go +++ b/utils/tolerantinformer/tolerantinformer_test.go @@ -122,7 +122,7 @@ func TestMalformedRolloutEphemeralCtr(t *testing.T) { verify(list[0]) } -func verifyAnalysisSpec(t *testing.T, s interface{}) { +func verifyAnalysisSpec(t *testing.T, s any) { // metrics: // - name: test // provider: diff --git a/utils/tolerantinformer/tollerantinformer.go b/utils/tolerantinformer/tollerantinformer.go index aba0bd7f29..e3996f9cce 100644 --- a/utils/tolerantinformer/tollerantinformer.go +++ b/utils/tolerantinformer/tollerantinformer.go @@ -14,7 +14,7 @@ import ( // convertObject converts a runtime.Object into the supplied concrete typed object // typedObj should be a pointer to a typed object which is desired to be filled in. // This is a best effort conversion which ignores unmarshalling errors. -func convertObject(object runtime.Object, typedObj interface{}) error { +func convertObject(object runtime.Object, typedObj any) error { un, ok := object.(*unstructured.Unstructured) if !ok { return fmt.Errorf("malformed object: expected \"*unstructured.Unstructured\", got \"%s\"", reflect.TypeOf(object).Name()) @@ -35,7 +35,7 @@ func convertObject(object runtime.Object, typedObj interface{}) error { return nil } -func fromUnstructuredViaJSON(u map[string]interface{}, obj interface{}) error { +func fromUnstructuredViaJSON(u map[string]any, obj any) error { data, err := json.Marshal(u) if err != nil { return err diff --git a/utils/unstructured/unstructured.go b/utils/unstructured/unstructured.go index 7c73812da3..a0dd341a48 100644 --- a/utils/unstructured/unstructured.go +++ b/utils/unstructured/unstructured.go @@ -13,7 +13,7 @@ import ( ) func StrToUnstructuredUnsafe(jsonStr string) *unstructured.Unstructured { - obj := make(map[string]interface{}) + obj := make(map[string]any) err := yaml.Unmarshal([]byte(jsonStr), &obj) if err != nil { panic(err) @@ -22,7 +22,7 @@ func StrToUnstructuredUnsafe(jsonStr string) *unstructured.Unstructured { } func StrToUnstructured(jsonStr string) (*unstructured.Unstructured, error) { - obj := make(map[string]interface{}) + obj := make(map[string]any) err := yaml.Unmarshal([]byte(jsonStr), &obj) if err != nil { return nil, err @@ -30,7 +30,7 @@ func StrToUnstructured(jsonStr string) (*unstructured.Unstructured, error) { return &unstructured.Unstructured{Object: obj}, nil } -func ObjectToRollout(obj interface{}) *v1alpha1.Rollout { +func ObjectToRollout(obj any) *v1alpha1.Rollout { un, ok := obj.(*unstructured.Unstructured) if ok { var ro v1alpha1.Rollout @@ -49,7 +49,7 @@ func ObjectToRollout(obj interface{}) *v1alpha1.Rollout { return ro } -func ObjectToAnalysisRun(obj interface{}) *v1alpha1.AnalysisRun { +func ObjectToAnalysisRun(obj any) *v1alpha1.AnalysisRun { un, ok := obj.(*unstructured.Unstructured) if ok { var ar v1alpha1.AnalysisRun @@ -67,7 +67,7 @@ func ObjectToAnalysisRun(obj interface{}) *v1alpha1.AnalysisRun { return ar } -func ObjectToExperiment(obj interface{}) *v1alpha1.Experiment { +func ObjectToExperiment(obj any) *v1alpha1.Experiment { un, ok := obj.(*unstructured.Unstructured) if ok { var ex v1alpha1.Experiment @@ -93,7 +93,7 @@ func SplitYAML(out string) ([]*unstructured.Unstructured, error) { parts := diffSeparator.Split(out, -1) var objs []*unstructured.Unstructured for _, part := range parts { - var objMap map[string]interface{} + var objMap map[string]any err := yaml.Unmarshal([]byte(part), &objMap) if err != nil { return objs, err From 40291a1aeb210df6af93b7dfa7adef73ed8c7c59 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 12:04:01 -0500 Subject: [PATCH 011/187] chore(deps): bump actions/checkout from 3 to 4 (#3012) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/changelog.yml | 2 +- .github/workflows/codeql.yml | 2 +- .github/workflows/e2e.yaml | 2 +- .github/workflows/gh-pages.yaml | 2 +- .github/workflows/go.yml | 6 +++--- .github/workflows/image-reuse.yaml | 4 ++-- .github/workflows/release.yaml | 6 +++--- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 6120a179b9..6bfae53fe4 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -12,7 +12,7 @@ jobs: pull-requests: write # for peter-evans/create-pull-request to create a PR runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Update Changelog diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d8309ea267..f9915287da 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 749a4b4f55..a3e7aed29f 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -49,7 +49,7 @@ jobs: uses: actions/setup-go@v4.1.0 with: go-version: '1.20' - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@v4 - name: Setup k3s env: INSTALL_K3S_CHANNEL: v${{ matrix.kubernetes-minor-version }} diff --git a/.github/workflows/gh-pages.yaml b/.github/workflows/gh-pages.yaml index 59fece9c6e..6746b7406d 100644 --- a/.github/workflows/gh-pages.yaml +++ b/.github/workflows/gh-pages.yaml @@ -18,7 +18,7 @@ jobs: contents: write # for peaceiris/actions-gh-pages to push pages branch runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@v4 - name: Setup Python uses: actions/setup-python@v4 with: diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 1b5d170f12..961203bcef 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -40,7 +40,7 @@ jobs: with: go-version: ${{ env.GOLANG_VERSION }} - name: Checkout code - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v4 - name: Run golangci-lint uses: golangci/golangci-lint-action@v3 with: @@ -57,7 +57,7 @@ jobs: id: go - name: Check out code into the Go module directory - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v4 - name: Restore go build cache uses: actions/cache@v3 @@ -101,7 +101,7 @@ jobs: GOPATH: /home/runner/go steps: - name: Checkout code - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v4 - name: Setup Golang uses: actions/setup-go@v4.1.0 with: diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index 41b749a33d..341d328a2e 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -58,14 +58,14 @@ jobs: image-digest: ${{ steps.image.outputs.digest }} steps: - name: Checkout code - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.3.0 + uses: actions/checkout@v4 # v3.3.0 with: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} if: ${{ github.ref_type == 'tag'}} - name: Checkout code - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.3.0 + uses: actions/checkout@v4 # v3.3.0 if: ${{ github.ref_type != 'tag'}} - name: Setup Golang diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2eb8fce786..6ac65d4be1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -85,7 +85,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@v4 # v3.5.2 with: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} @@ -159,7 +159,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.3.0 + uses: actions/checkout@v4 # v3.3.0 with: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} @@ -232,7 +232,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.3.0 + uses: actions/checkout@v4 # v3.3.0 with: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} From 37b5e12541e1ace5bfd91161396deaa30f76763d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 08:33:19 -0500 Subject: [PATCH 012/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.38 to 1.18.39 (#3018) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.38 to 1.18.39. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.38...config/v1.18.39) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 194ea42f40..b28cebc838 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.38 + github.com/aws/aws-sdk-go-v2/config v1.18.39 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3 github.com/blang/semver v3.5.1+incompatible @@ -82,14 +82,14 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.36 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.37 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect diff --git a/go.sum b/go.sum index 391f548a45..daf8ad437a 100644 --- a/go.sum +++ b/go.sum @@ -105,10 +105,10 @@ github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WN github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.38 h1:CByQCELMgm2tM1lAehx3XNg0R/pfeXsYzqn0Aq2chJQ= -github.com/aws/aws-sdk-go-v2/config v1.18.38/go.mod h1:vNm9Hf5VgG2fSUWhT3zFrqN/RosGcabFMYgiSoxKFU8= -github.com/aws/aws-sdk-go-v2/credentials v1.13.36 h1:ps0cPswZjpsOk6sLwG6fdXTzrYjCplgPEyG3OUbbdqE= -github.com/aws/aws-sdk-go-v2/credentials v1.13.36/go.mod h1:sY2phUzxbygoyDtTXhqi7GjGjCQ1S5a5Rj8u3ksBxCg= +github.com/aws/aws-sdk-go-v2/config v1.18.39 h1:oPVyh6fuu/u4OiW4qcuQyEtk7U7uuNBmHmJSLg1AJsQ= +github.com/aws/aws-sdk-go-v2/config v1.18.39/go.mod h1:+NH/ZigdPckFpgB1TRcRuWCB/Kbbvkxc/iNAKTq5RhE= +github.com/aws/aws-sdk-go-v2/credentials v1.13.37 h1:BvEdm09+ZEh2XtN+PVHPcYwKY3wIeB6pw7vPRM4M9/U= +github.com/aws/aws-sdk-go-v2/credentials v1.13.37/go.mod h1:ACLrdkd4CLZyXOghZ8IYumQbcooAcp2jo/s2xsFH8IM= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= @@ -125,8 +125,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKi github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 h1:2PylFCfKCEDv6PeSN09pC/VUiRd10wi1VfHG5FrW0/g= github.com/aws/aws-sdk-go-v2/service/sso v1.13.6/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5 h1:dnInJb4S0oy8aQuri1mV6ipLlnZPfnsDNB9BGO9PDNY= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 h1:pSB560BbVj9ZlJZF4WYj5zsytWHWKxg+NgyGV4B2L58= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 h1:CQBFElb0LS8RojMJlxRSo/HXipvTZW2S44Lt9Mk2aYQ= github.com/aws/aws-sdk-go-v2/service/sts v1.21.5/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= From 95cc1987d219f082cb13460b392d9be5bbc73a33 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 20:33:41 +0000 Subject: [PATCH 013/187] docs: Update Changelog (#3021) * update changelog Signed-off-by: zachaller * re-trigger Signed-off-by: zachaller * re-trigger Signed-off-by: zachaller --------- Signed-off-by: zachaller Co-authored-by: zachaller Signed-off-by: Philip Clark --- CHANGELOG.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63bef5a828..403f5c2f5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,23 @@ + +## [v1.6.0](https://github.com/argoproj/argo-rollouts/compare/v1.6.0-rc1...v1.6.0) (2023-09-05) + +### Chore + +* **deps:** bump github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 from 1.20.2 to 1.21.0 ([#2950](https://github.com/argoproj/argo-rollouts/issues/2950)) +* **deps:** bump github.com/antonmedv/expr from 1.12.7 to 1.13.0 ([#2951](https://github.com/argoproj/argo-rollouts/issues/2951)) + +### Docs + +* update supported k8s version ([#2949](https://github.com/argoproj/argo-rollouts/issues/2949)) + +### Fix + +* analysis step should be ignored after promote ([#3016](https://github.com/argoproj/argo-rollouts/issues/3016)) +* **controller:** rollback should skip all steps to active rs within RollbackWindow ([#2953](https://github.com/argoproj/argo-rollouts/issues/2953)) +* **controller:** typo fix ("Secrete" -> "Secret") in secret informer ([#2965](https://github.com/argoproj/argo-rollouts/issues/2965)) + + ## [v1.6.0-rc1](https://github.com/argoproj/argo-rollouts/compare/v1.5.1...v1.6.0-rc1) (2023-08-10) From 4129d8ebcd60893416fe878ffb111c74baf1fcff Mon Sep 17 00:00:00 2001 From: mitchell amihod Date: Wed, 6 Sep 2023 23:47:38 +0100 Subject: [PATCH 014/187] fix: Add the GOPATH to the go-to-protobuf command (#3022) Add the GOPATH to the go-to-protobuf command Signed-off-by: mitchell amihod <4623+meeech@users.noreply.github.com> Signed-off-by: Philip Clark --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 638498ff85..a5f77cc568 100644 --- a/Makefile +++ b/Makefile @@ -111,7 +111,7 @@ gen-proto: k8s-proto api-proto ui-proto # generates the .proto files affected by changes to types.go .PHONY: k8s-proto k8s-proto: go-mod-vendor $(TYPES) ## generate kubernetes protobuf files - PATH=${DIST_DIR}:$$PATH go-to-protobuf \ + PATH=${DIST_DIR}:$$PATH GOPATH=${GOPATH} go-to-protobuf \ --go-header-file=./hack/custom-boilerplate.go.txt \ --packages=github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1 \ --apimachinery-packages=${APIMACHINERY_PKGS} \ From 4be4edd847c0203ceb051fc962f3293662565c1e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 14:05:27 -0500 Subject: [PATCH 015/187] chore(deps): bump github.com/antonmedv/expr from 1.13.0 to 1.15.1 (#3024) Bumps [github.com/antonmedv/expr](https://github.com/antonmedv/expr) from 1.13.0 to 1.15.1. - [Release notes](https://github.com/antonmedv/expr/releases) - [Commits](https://github.com/antonmedv/expr/compare/v1.13.0...v1.15.1) --- updated-dependencies: - dependency-name: github.com/antonmedv/expr dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b28cebc838..f6a6d23766 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/argoproj/argo-rollouts go 1.20 require ( - github.com/antonmedv/expr v1.13.0 + github.com/antonmedv/expr v1.15.1 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 diff --git a/go.sum b/go.sum index daf8ad437a..8d488e8e03 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.13.0 h1:8YrTtlCzlOtXw+hpeCLDLL2uo0C0k6jmYpYTGws5c5w= -github.com/antonmedv/expr v1.13.0/go.mod h1:FPC8iWArxls7axbVLsW+kpg1mz29A1b2M6jt+hZfDkU= +github.com/antonmedv/expr v1.15.1 h1:mxeRIkH8GQJo4MRRFgp0ArlV4AA+0DmcJNXEsG70rGU= +github.com/antonmedv/expr v1.15.1/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= From f9cd2041476da1ae645fc41081a94ca248a2cef4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 14:06:00 -0500 Subject: [PATCH 016/187] chore(deps): bump github.com/hashicorp/go-plugin from 1.5.0 to 1.5.1 (#3017) Bumps [github.com/hashicorp/go-plugin](https://github.com/hashicorp/go-plugin) from 1.5.0 to 1.5.1. - [Release notes](https://github.com/hashicorp/go-plugin/releases) - [Changelog](https://github.com/hashicorp/go-plugin/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/go-plugin/compare/v1.5.0...v1.5.1) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f6a6d23766..ebd7c64cc9 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.3 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/hashicorp/go-plugin v1.5.0 + github.com/hashicorp/go-plugin v1.5.1 github.com/influxdata/influxdb-client-go/v2 v2.12.3 github.com/juju/ansiterm v1.0.0 github.com/machinebox/graphql v0.2.2 diff --git a/go.sum b/go.sum index 8d488e8e03..3ae3862224 100644 --- a/go.sum +++ b/go.sum @@ -402,8 +402,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.14.1 h1:nQcJDQwIAGnmoUWp8ubocEX40cCml/17YkF6csQLReU= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-plugin v1.5.0 h1:g6Lj3USwF5LaB8HlvCxPjN2X4nFE08ko2BJNVpl7TIE= -github.com/hashicorp/go-plugin v1.5.0/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= +github.com/hashicorp/go-plugin v1.5.1 h1:oGm7cWBaYIp3lJpx1RUEfLWophprE2EV/KUeqBYo+6k= +github.com/hashicorp/go-plugin v1.5.1/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.1/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= From b0a7457486306d9eb5b200982c3db188f6ab94d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Sep 2023 12:03:56 -0500 Subject: [PATCH 017/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 from 1.21.3 to 1.21.4 (#3025) chore(deps): bump github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 Bumps [github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2](https://github.com/aws/aws-sdk-go-v2) from 1.21.3 to 1.21.4. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/efs/v1.21.3...service/efs/v1.21.4) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ebd7c64cc9..19cd37cbd8 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.21.0 github.com/aws/aws-sdk-go-v2/config v1.18.39 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 - github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3 + github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible github.com/bombsimon/logrusr/v4 v4.0.0 github.com/evanphx/json-patch/v5 v5.6.0 diff --git a/go.sum b/go.sum index 3ae3862224..23719b238a 100644 --- a/go.sum +++ b/go.sum @@ -119,8 +119,8 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 h1:GPUcE/Yq7Ur8YSUk6lVkoIMWnJN github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 h1:qULF+ElcvjjSEO1+z5x+TmKE9d4yTej7PfpJQPVvexY= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7/go.mod h1:1HKxVrj5wsKy/wb2v07vzTSd+YPV1sDsWxferwPK7PA= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3 h1:CAWMcMnRYCBaeMnycTwZs+0BcuepIMfyP3F0r1VfgPc= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 h1:2PylFCfKCEDv6PeSN09pC/VUiRd10wi1VfHG5FrW0/g= From c7e401f66baa7dabf6ed7f6e04af409d897b7134 Mon Sep 17 00:00:00 2001 From: mitchell amihod Date: Fri, 8 Sep 2023 22:55:24 +0100 Subject: [PATCH 018/187] chore: Update users doc with CircleCI (#3028) Update users doc with CircleCI Signed-off-by: mitchell amihod <4623+meeech@users.noreply.github.com> Signed-off-by: Philip Clark --- USERS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/USERS.md b/USERS.md index 4094c152c3..4ad9fb29bf 100644 --- a/USERS.md +++ b/USERS.md @@ -9,6 +9,7 @@ Organizations below are **officially** using Argo Rollouts. Please send a PR wit 1. [Bucketplace](https://www.bucketplace.co.kr/) 1. [BukuKas](https://bukukas.co.id/) 1. [Calm](https://www.calm.com/) +1. [CircleCI](https://circleci.com/) 1. [Codefresh](https://codefresh.io/) 1. [Credit Karma](https://creditkarma.com/) 1. [DaoCloud](https://daocloud.io) From 25dc599eab8cda80fe80faf64121632f93e3e7f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:10:00 -0500 Subject: [PATCH 019/187] chore(deps): bump github.com/antonmedv/expr from 1.15.1 to 1.15.2 (#3036) Bumps [github.com/antonmedv/expr](https://github.com/antonmedv/expr) from 1.15.1 to 1.15.2. - [Release notes](https://github.com/antonmedv/expr/releases) - [Commits](https://github.com/antonmedv/expr/compare/v1.15.1...v1.15.2) --- updated-dependencies: - dependency-name: github.com/antonmedv/expr dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 19cd37cbd8..e747a4983c 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/argoproj/argo-rollouts go 1.20 require ( - github.com/antonmedv/expr v1.15.1 + github.com/antonmedv/expr v1.15.2 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 diff --git a/go.sum b/go.sum index 23719b238a..da8d8cf479 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.1 h1:mxeRIkH8GQJo4MRRFgp0ArlV4AA+0DmcJNXEsG70rGU= -github.com/antonmedv/expr v1.15.1/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= +github.com/antonmedv/expr v1.15.2 h1:afFXpDWIC2n3bF+kTZE1JvFo+c34uaM3sTqh8z0xfdU= +github.com/antonmedv/expr v1.15.2/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= From 79a3161750efa6bba7d6e5f57103474517f37b27 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:10:32 -0500 Subject: [PATCH 020/187] chore(deps): bump docker/login-action from 2.2.0 to 3.0.0 (#3035) Bumps [docker/login-action](https://github.com/docker/login-action) from 2.2.0 to 3.0.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/465a07811f14bebb1938fbed4728c6a1ff8901fc...343f7c4344506bcbf9b4de18042ae17996df046d) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/image-reuse.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index 341d328a2e..c90b286b10 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -106,7 +106,7 @@ jobs: echo 'EOF' >> $GITHUB_ENV - name: Login to Quay.io - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: registry: quay.io username: ${{ secrets.quay_username }} @@ -114,7 +114,7 @@ jobs: if: ${{ inputs.quay_image_name && inputs.push }} - name: Login to GitHub Container Registry - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: registry: ghcr.io username: ${{ secrets.ghcr_username }} @@ -122,7 +122,7 @@ jobs: if: ${{ inputs.ghcr_image_name && inputs.push }} - name: Login to dockerhub Container Registry - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: username: ${{ secrets.docker_username }} password: ${{ secrets.docker_password }} From bf37c3e87199c9bb722e10182e59b0f3d621f4fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:10:56 -0500 Subject: [PATCH 021/187] chore(deps): bump docker/setup-buildx-action from 2.10.0 to 3.0.0 (#3034) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.10.0 to 3.0.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/885d1462b80bc1c1c7f0b00334ad271f09369c55...f95db51fddba0c2d1ec667646a06c2ce06100226) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/image-reuse.yaml | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index c90b286b10..adcbe86473 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -79,7 +79,7 @@ jobs: cosign-release: 'v2.0.2' - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 - - uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0 + - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Setup tags for container image as a CSV type run: | diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6ac65d4be1..918958b729 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -99,7 +99,7 @@ jobs: uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0 + uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Generate release artifacts run: | From bc5f161665c891658f8622696f5a197301ec0452 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:11:35 -0500 Subject: [PATCH 022/187] chore(deps): bump docker/build-push-action from 4.1.1 to 5.0.0 (#3033) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.1.1 to 5.0.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/2eb1c1961a95fc15694676618e422e8ba1d63825...0565240e2d4ab88bba5387d719585280857ece09) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/image-reuse.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index adcbe86473..6c98cb9bfc 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -130,7 +130,7 @@ jobs: - name: Build and push container image id: image - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 #v4.1.1 + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 #v5.0.0 with: context: . platforms: ${{ inputs.platforms }} From e25db147991239ffbc9708516c97d325a1977d3c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:12:01 -0500 Subject: [PATCH 023/187] chore(deps): bump docker/metadata-action from 4 to 5 (#3032) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4 to 5. - [Release notes](https://github.com/docker/metadata-action/releases) - [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md) - [Commits](https://github.com/docker/metadata-action/compare/v4...v5) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/docker-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 1a51e2a485..c762c89c29 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -28,7 +28,7 @@ jobs: steps: - name: Docker meta (controller) id: controller-meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | quay.io/argoproj/argo-rollouts @@ -38,7 +38,7 @@ jobs: - name: Docker meta (plugin) id: plugin-meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | quay.io/argoproj/kubectl-argo-rollouts From a4405a8875a649e5d9638377c571d98a84beac67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:12:43 -0500 Subject: [PATCH 024/187] chore(deps): bump github.com/evanphx/json-patch/v5 from 5.6.0 to 5.7.0 (#3030) Bumps [github.com/evanphx/json-patch/v5](https://github.com/evanphx/json-patch) from 5.6.0 to 5.7.0. - [Release notes](https://github.com/evanphx/json-patch/releases) - [Commits](https://github.com/evanphx/json-patch/compare/v5.6.0...v5.7.0) --- updated-dependencies: - dependency-name: github.com/evanphx/json-patch/v5 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e747a4983c..1e6633fa29 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible github.com/bombsimon/logrusr/v4 v4.0.0 - github.com/evanphx/json-patch/v5 v5.6.0 + github.com/evanphx/json-patch/v5 v5.7.0 github.com/gogo/protobuf v1.3.2 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.3 diff --git a/go.sum b/go.sum index da8d8cf479..837eaee024 100644 --- a/go.sum +++ b/go.sum @@ -206,8 +206,8 @@ github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0 github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= +github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= From 87eb641a3764ee5ce9e72ab620f4d13848dee190 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:13:13 -0500 Subject: [PATCH 025/187] chore(deps): bump google.golang.org/grpc from 1.57.0 to 1.58.0 (#3023) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.57.0 to 1.58.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.57.0...v1.58.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 22 +++++++++++----------- go.sum | 40 +++++++++++++++++++++++----------------- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/go.mod b/go.mod index 1e6633fa29..d809ee3e2d 100644 --- a/go.mod +++ b/go.mod @@ -36,8 +36,8 @@ require ( github.com/stretchr/testify v1.8.4 github.com/tj/assert v0.0.3 github.com/valyala/fasttemplate v1.2.2 - google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 - google.golang.org/grpc v1.57.0 + google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 + google.golang.org/grpc v1.58.0 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.8 @@ -57,7 +57,7 @@ require ( ) require ( - cloud.google.com/go/compute v1.19.1 // indirect + cloud.google.com/go/compute v1.21.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.27 // indirect @@ -171,20 +171,20 @@ require ( github.com/whilp/git-urls v0.0.0-20191001220047-6db9661140c0 // indirect github.com/xlab/treeprint v1.1.0 // indirect go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect - golang.org/x/crypto v0.7.0 // indirect + golang.org/x/crypto v0.11.0 // indirect golang.org/x/mod v0.8.0 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect + golang.org/x/net v0.12.0 // indirect + golang.org/x/oauth2 v0.10.0 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/term v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.6.0 // indirect gomodules.xyz/envconfig v1.3.1-0.20190308184047-426f31af0d45 // indirect gomodules.xyz/notify v0.1.1 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect + google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/go.sum b/go.sum index 837eaee024..582dc24d37 100644 --- a/go.sum +++ b/go.sum @@ -19,8 +19,8 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.19.1 h1:am86mquDUgjGNWxiGn+5PGLbmgiWXlE/yNWpIpNvuXY= -cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= +cloud.google.com/go/compute v1.21.0 h1:JNBsyXVoOoNJtTQcnEY5uYpZIbeCTYIeDe0Xh1bySMk= +cloud.google.com/go/compute v1.21.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= @@ -739,8 +739,9 @@ golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220513210258-46612604a0f9/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -826,16 +827,18 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= +golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= +golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -849,7 +852,7 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -920,16 +923,18 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -942,8 +947,9 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1070,12 +1076,12 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 h1:9NWlQfY2ePejTmfwUH1OWwmznFa+0kKcHGPDvcPza9M= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 h1:m8v1xLLLzMe1m5P+gCTF8nJB9epwZQUBERm20Oy1poQ= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= +google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= +google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= +google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1091,8 +1097,8 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= -google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= +google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o= +google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From eb1a32549a5061e67f9f8adb89b77af502af5af1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 12:12:13 -0500 Subject: [PATCH 026/187] chore(deps): bump google.golang.org/grpc from 1.58.0 to 1.58.2 (#3050) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.0 to 1.58.2. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.58.0...v1.58.2) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d809ee3e2d..0790b439cd 100644 --- a/go.mod +++ b/go.mod @@ -37,7 +37,7 @@ require ( github.com/tj/assert v0.0.3 github.com/valyala/fasttemplate v1.2.2 google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 - google.golang.org/grpc v1.58.0 + google.golang.org/grpc v1.58.2 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.8 diff --git a/go.sum b/go.sum index 582dc24d37..eac3a04904 100644 --- a/go.sum +++ b/go.sum @@ -1097,8 +1097,8 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o= -google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= +google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 86b970bbfeae886446c119a05b3c20aef6203a10 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Sep 2023 21:01:10 -0500 Subject: [PATCH 027/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.39 to 1.18.41 (#3047) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.39 to 1.18.41. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.39...config/v1.18.41) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 0790b439cd..4e25eb3a57 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.39 + github.com/aws/aws-sdk-go-v2/config v1.18.41 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,15 +82,15 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.37 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.39 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect diff --git a/go.sum b/go.sum index eac3a04904..c3060a94b6 100644 --- a/go.sum +++ b/go.sum @@ -105,10 +105,10 @@ github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WN github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.39 h1:oPVyh6fuu/u4OiW4qcuQyEtk7U7uuNBmHmJSLg1AJsQ= -github.com/aws/aws-sdk-go-v2/config v1.18.39/go.mod h1:+NH/ZigdPckFpgB1TRcRuWCB/Kbbvkxc/iNAKTq5RhE= -github.com/aws/aws-sdk-go-v2/credentials v1.13.37 h1:BvEdm09+ZEh2XtN+PVHPcYwKY3wIeB6pw7vPRM4M9/U= -github.com/aws/aws-sdk-go-v2/credentials v1.13.37/go.mod h1:ACLrdkd4CLZyXOghZ8IYumQbcooAcp2jo/s2xsFH8IM= +github.com/aws/aws-sdk-go-v2/config v1.18.41 h1:Go7z97YDsBJVNAaL7pDPKB6LeHEsAkHmFe+CeK30fUQ= +github.com/aws/aws-sdk-go-v2/config v1.18.41/go.mod h1:+yR45+A0LIMKT8bWOKo90Hy9rSrovEmEKoPKLmmVec8= +github.com/aws/aws-sdk-go-v2/credentials v1.13.39 h1:UnwBXDIHKDaejSXaRzKR57IdGCizk+z1DEhnsFpus7Q= +github.com/aws/aws-sdk-go-v2/credentials v1.13.39/go.mod h1:OJ9P239A90TnglJEF3qofKiNeEM6PCV/m+aNGV5WC24= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= @@ -123,12 +123,12 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeo github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 h1:2PylFCfKCEDv6PeSN09pC/VUiRd10wi1VfHG5FrW0/g= -github.com/aws/aws-sdk-go-v2/service/sso v1.13.6/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 h1:pSB560BbVj9ZlJZF4WYj5zsytWHWKxg+NgyGV4B2L58= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= -github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 h1:CQBFElb0LS8RojMJlxRSo/HXipvTZW2S44Lt9Mk2aYQ= -github.com/aws/aws-sdk-go-v2/service/sts v1.21.5/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 h1:AR/hlTsCyk1CwlyKnPFvIMvnONydRjDDRT9OGb0i+/g= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 h1:UniOmlPJelksyP5dGjfRoFTmLDy4/o0HH1lK2Op7zC8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk= +github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= From 925ff0a06a644676ed55d110f620e24de1b48fb2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Sep 2023 21:05:26 -0500 Subject: [PATCH 028/187] chore(deps): bump docker/setup-qemu-action from 2.2.0 to 3.0.0 (#3031) Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2.2.0 to 3.0.0. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/2b82ce82d56a2a04d2637cd93a637ae1b359c0a7...68827325e0b33c7199eb31dd4e31fbe9023e06e3) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/image-reuse.yaml | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index 6c98cb9bfc..eefb23923d 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -78,7 +78,7 @@ jobs: with: cosign-release: 'v2.0.2' - - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 + - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Setup tags for container image as a CSV type diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 918958b729..df9479da3f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -96,7 +96,7 @@ jobs: go-version: ${{ env.GOLANG_VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 + uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 From ee8ebf2b38897822fdca56a8f10210cec99d2504 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Sep 2023 21:05:51 -0500 Subject: [PATCH 029/187] chore(deps): bump github.com/antonmedv/expr from 1.15.2 to 1.15.3 (#3046) Bumps [github.com/antonmedv/expr](https://github.com/antonmedv/expr) from 1.15.2 to 1.15.3. - [Release notes](https://github.com/antonmedv/expr/releases) - [Commits](https://github.com/antonmedv/expr/compare/v1.15.2...v1.15.3) --- updated-dependencies: - dependency-name: github.com/antonmedv/expr dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4e25eb3a57..7a6438616a 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/argoproj/argo-rollouts go 1.20 require ( - github.com/antonmedv/expr v1.15.2 + github.com/antonmedv/expr v1.15.3 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 diff --git a/go.sum b/go.sum index c3060a94b6..e5db982007 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.2 h1:afFXpDWIC2n3bF+kTZE1JvFo+c34uaM3sTqh8z0xfdU= -github.com/antonmedv/expr v1.15.2/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= +github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= +github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= From 269fd42f6ea02784f9d48f2e1725f0a43992f23c Mon Sep 17 00:00:00 2001 From: "Kostis (Codefresh)" <39800303+kostis-codefresh@users.noreply.github.com> Date: Mon, 25 Sep 2023 15:47:24 +0300 Subject: [PATCH 030/187] docs: clarify external clusters (#3058) Signed-off-by: Kostis (Codefresh) <39800303+kostis-codefresh@users.noreply.github.com> Signed-off-by: Philip Clark --- docs/FAQ.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/FAQ.md b/docs/FAQ.md index 8a0c921cc7..861e4b3a80 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -41,6 +41,10 @@ solution that does not follow the GitOps approach. Yes. A k8s cluster can run multiple replicas of Argo-rollouts controllers to achieve HA. To enable this feature, run the controller with `--leader-elect` flag and increase the number of replicas in the controller's deployment manifest. The implementation is based on the [k8s client-go's leaderelection package](https://pkg.go.dev/k8s.io/client-go/tools/leaderelection#section-documentation). This implementation is tolerant to *arbitrary clock skew* among replicas. The level of tolerance to skew rate can be configured by setting `--leader-election-lease-duration` and `--leader-election-renew-deadline` appropriately. Please refer to the [package documentation](https://pkg.go.dev/k8s.io/client-go/tools/leaderelection#pkg-overview) for details. +### Can we install Argo Rollouts centrally in a cluster and manage Rollout resources in external clusters? + +No you cannot do that (even though Argo CD can work that way). This is by design because the Rollout is a custom resource unknown to vanilla Kubernetes. You need the Rollout CRD as well as the controller in the deployment cluster (every cluster that will use workloads with Rollouts). + ## Rollouts ### Which deployment strategies does Argo Rollouts support? From 27212d02ad8ce4bf32feb1cee833a355e3e6d0f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 07:42:45 -0500 Subject: [PATCH 031/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.41 to 1.18.42 (#3055) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.41 to 1.18.42. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.41...config/v1.18.42) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 7a6438616a..6fcf264f9c 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.41 + github.com/aws/aws-sdk-go-v2/config v1.18.42 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,14 +82,14 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.39 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.40 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect diff --git a/go.sum b/go.sum index e5db982007..f0a32df12b 100644 --- a/go.sum +++ b/go.sum @@ -105,28 +105,28 @@ github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WN github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.41 h1:Go7z97YDsBJVNAaL7pDPKB6LeHEsAkHmFe+CeK30fUQ= -github.com/aws/aws-sdk-go-v2/config v1.18.41/go.mod h1:+yR45+A0LIMKT8bWOKo90Hy9rSrovEmEKoPKLmmVec8= -github.com/aws/aws-sdk-go-v2/credentials v1.13.39 h1:UnwBXDIHKDaejSXaRzKR57IdGCizk+z1DEhnsFpus7Q= -github.com/aws/aws-sdk-go-v2/credentials v1.13.39/go.mod h1:OJ9P239A90TnglJEF3qofKiNeEM6PCV/m+aNGV5WC24= +github.com/aws/aws-sdk-go-v2/config v1.18.42 h1:28jHROB27xZwU0CB88giDSjz7M1Sba3olb5JBGwina8= +github.com/aws/aws-sdk-go-v2/config v1.18.42/go.mod h1:4AZM3nMMxwlG+eZlxvBKqwVbkDLlnN2a4UGTL6HjaZI= +github.com/aws/aws-sdk-go-v2/credentials v1.13.40 h1:s8yOkDh+5b1jUDhMBtngF6zKWLDs84chUk2Vk0c38Og= +github.com/aws/aws-sdk-go-v2/credentials v1.13.40/go.mod h1:VtEHVAAqDWASwdOqj/1huyT6uHbs5s8FUHfDQdky/Rs= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 h1:SijA0mgjV8E+8G45ltVHs0fvKpTj8xmZJ3VwhGKtUSI= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 h1:GPUcE/Yq7Ur8YSUk6lVkoIMWnJNO0HT18GUzCWCgCI0= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 h1:qULF+ElcvjjSEO1+z5x+TmKE9d4yTej7PfpJQPVvexY= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7/go.mod h1:1HKxVrj5wsKy/wb2v07vzTSd+YPV1sDsWxferwPK7PA= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 h1:AR/hlTsCyk1CwlyKnPFvIMvnONydRjDDRT9OGb0i+/g= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 h1:UniOmlPJelksyP5dGjfRoFTmLDy4/o0HH1lK2Op7zC8= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 h1:YkNzx1RLS0F5qdf9v1Q8Cuv9NXCL2TkosOxhzlUPV64= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.1/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk= github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= From 202b97cb073cc17a72deccaeca3e52e0bcbfe1e2 Mon Sep 17 00:00:00 2001 From: Jesse Suen Date: Fri, 29 Sep 2023 15:01:46 -0700 Subject: [PATCH 032/187] fix: prevent hot loop when fully promoted rollout is aborted (#3064) * fix: prevent hot loop when fully promoted rollout is aborted Signed-off-by: Jesse Suen * test: change expectations of abort tests Signed-off-by: Jesse Suen --------- Signed-off-by: Jesse Suen Signed-off-by: Philip Clark --- experiments/controller_test.go | 6 ++-- experiments/experiment_test.go | 2 +- experiments/replicaset_test.go | 4 +-- rollout/analysis_test.go | 64 +++++++++++++++++----------------- rollout/bluegreen_test.go | 16 ++++----- rollout/canary_test.go | 51 +++++++++++++-------------- rollout/controller.go | 5 +++ rollout/controller_test.go | 4 +-- rollout/experiment_test.go | 14 ++++---- rollout/service_test.go | 4 +-- test/e2e/istio_test.go | 4 +-- 11 files changed, 89 insertions(+), 85 deletions(-) diff --git a/experiments/controller_test.go b/experiments/controller_test.go index 26587b6346..0103e03ce1 100644 --- a/experiments/controller_test.go +++ b/experiments/controller_test.go @@ -805,7 +805,7 @@ func TestAddInvalidSpec(t *testing.T) { "status":{ } }`, nil, cond) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } func TestKeepInvalidSpec(t *testing.T) { @@ -852,7 +852,7 @@ func TestUpdateInvalidSpec(t *testing.T) { "status":{ } }`, nil, cond) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } @@ -892,7 +892,7 @@ func TestRemoveInvalidSpec(t *testing.T) { "status":{ } }`, templateStatus, cond) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } func TestRun(t *testing.T) { diff --git a/experiments/experiment_test.go b/experiments/experiment_test.go index e047082cee..21fbeb530a 100644 --- a/experiments/experiment_test.go +++ b/experiments/experiment_test.go @@ -282,7 +282,7 @@ func TestSuccessAfterDurationPasses(t *testing.T) { "phase": "Successful" } }`, templateStatuses, cond) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } // TestDontRequeueWithoutDuration verifies we don't requeue if an experiment does not have diff --git a/experiments/replicaset_test.go b/experiments/replicaset_test.go index e4d1cdf231..030414f2df 100644 --- a/experiments/replicaset_test.go +++ b/experiments/replicaset_test.go @@ -42,7 +42,7 @@ func TestCreateMultipleRS(t *testing.T) { "status":{ } }`, templateStatus, cond) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } func TestCreateMissingRS(t *testing.T) { @@ -72,7 +72,7 @@ func TestCreateMissingRS(t *testing.T) { generateTemplatesStatus("bar", 0, 0, v1alpha1.TemplateStatusProgressing, now()), generateTemplatesStatus("baz", 0, 0, v1alpha1.TemplateStatusProgressing, now()), } - assert.Equal(t, calculatePatch(e, expectedPatch, templateStatuses, cond), patch) + assert.JSONEq(t, calculatePatch(e, expectedPatch, templateStatuses, cond), patch) } func TestTemplateHasMultipleRS(t *testing.T) { diff --git a/rollout/analysis_test.go b/rollout/analysis_test.go index f0313d7ea0..de9a5e1db3 100644 --- a/rollout/analysis_test.go +++ b/rollout/analysis_test.go @@ -180,7 +180,7 @@ func TestCreateBackgroundAnalysisRun(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) } func TestCreateBackgroundAnalysisRunWithTemplates(t *testing.T) { @@ -241,7 +241,7 @@ func TestCreateBackgroundAnalysisRunWithTemplates(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) } func TestCreateBackgroundAnalysisRunWithClusterTemplates(t *testing.T) { @@ -303,7 +303,7 @@ func TestCreateBackgroundAnalysisRunWithClusterTemplates(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) } func TestInvalidSpecMissingClusterTemplatesBackgroundAnalysis(t *testing.T) { @@ -339,7 +339,7 @@ func TestInvalidSpecMissingClusterTemplatesBackgroundAnalysis(t *testing.T) { expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, progressingCond, string(invalidSpecBytes), strings.ReplaceAll(errmsg, "\"", "\\\"")) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } func TestCreateBackgroundAnalysisRunWithClusterTemplatesAndTemplate(t *testing.T) { @@ -416,7 +416,7 @@ func TestCreateBackgroundAnalysisRunWithClusterTemplatesAndTemplate(t *testing.T } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) } // TestCreateAnalysisRunWithCollision ensures we will create an new analysis run with a new name @@ -487,7 +487,7 @@ func TestCreateAnalysisRunWithCollision(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedAR.Name)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedAR.Name)), patch) } // TestCreateAnalysisRunWithCollisionAndSemanticEquality will ensure we do not create an extra @@ -550,7 +550,7 @@ func TestCreateAnalysisRunWithCollisionAndSemanticEquality(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ar.Name)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ar.Name)), patch) } func TestCreateAnalysisRunOnAnalysisStep(t *testing.T) { @@ -611,7 +611,7 @@ func TestCreateAnalysisRunOnAnalysisStep(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) } func TestFailCreateStepAnalysisRunIfInvalidTemplateRef(t *testing.T) { @@ -653,7 +653,7 @@ func TestFailCreateStepAnalysisRunIfInvalidTemplateRef(t *testing.T) { expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, progressingCond, string(invalidSpecBytes), strings.ReplaceAll(errmsg, "\"", "\\\"")) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } func TestFailCreateBackgroundAnalysisRunIfInvalidTemplateRef(t *testing.T) { @@ -698,7 +698,7 @@ func TestFailCreateBackgroundAnalysisRunIfInvalidTemplateRef(t *testing.T) { expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, progressingCond, string(invalidSpecBytes), strings.ReplaceAll(errmsg, "\"", "\\\"")) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } func TestFailCreateBackgroundAnalysisRunIfMetricRepeated(t *testing.T) { @@ -745,7 +745,7 @@ func TestFailCreateBackgroundAnalysisRunIfMetricRepeated(t *testing.T) { expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, progressingCond, string(invalidSpecBytes), strings.ReplaceAll(errmsg, "\"", "\\\"")) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } func TestDoNothingWithAnalysisRunsWhileBackgroundAnalysisRunRunning(t *testing.T) { @@ -798,7 +798,7 @@ func TestDoNothingWithAnalysisRunsWhileBackgroundAnalysisRunRunning(t *testing.T patchIndex := f.expectPatchRolloutAction(r2) f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestDoNothingWhileStepBasedAnalysisRunRunning(t *testing.T) { @@ -847,7 +847,7 @@ func TestDoNothingWhileStepBasedAnalysisRunRunning(t *testing.T) { patchIndex := f.expectPatchRolloutAction(r2) f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestCancelOlderAnalysisRuns(t *testing.T) { @@ -915,7 +915,7 @@ func TestCancelOlderAnalysisRuns(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestDeleteAnalysisRunsWithNoMatchingRS(t *testing.T) { @@ -971,7 +971,7 @@ func TestDeleteAnalysisRunsWithNoMatchingRS(t *testing.T) { deletedAr := f.getDeletedAnalysisRun(deletedIndex) assert.Equal(t, deletedAr, arWithDiffPodHash.Name) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestDeleteAnalysisRunsAfterRSDelete(t *testing.T) { @@ -1083,7 +1083,7 @@ func TestIncrementStepAfterSuccessfulAnalysisRun(t *testing.T) { }` condition := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, rs2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition)), patch) } func TestPausedOnInconclusiveBackgroundAnalysisRun(t *testing.T) { @@ -1152,7 +1152,7 @@ func TestPausedOnInconclusiveBackgroundAnalysisRun(t *testing.T) { }` condition := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition, v1alpha1.PauseReasonInconclusiveAnalysis, now, v1alpha1.PauseReasonInconclusiveAnalysis)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition, v1alpha1.PauseReasonInconclusiveAnalysis, now, v1alpha1.PauseReasonInconclusiveAnalysis)), patch) } func TestPausedStepAfterInconclusiveAnalysisRun(t *testing.T) { @@ -1215,7 +1215,7 @@ func TestPausedStepAfterInconclusiveAnalysisRun(t *testing.T) { } }` condition := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition, v1alpha1.PauseReasonInconclusiveAnalysis, now, v1alpha1.PauseReasonInconclusiveAnalysis)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition, v1alpha1.PauseReasonInconclusiveAnalysis, now, v1alpha1.PauseReasonInconclusiveAnalysis)), patch) } func TestErrorConditionAfterErrorAnalysisRunStep(t *testing.T) { @@ -1282,7 +1282,7 @@ func TestErrorConditionAfterErrorAnalysisRunStep(t *testing.T) { errmsg := fmt.Sprintf(conditions.RolloutAbortedMessage, 2) + ": " + ar.Status.Message condition := generateConditionsPatch(true, conditions.RolloutAbortedReason, r2, false, errmsg, false) expectedPatch = fmt.Sprintf(expectedPatch, condition, now, errmsg) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestErrorConditionAfterErrorAnalysisRunBackground(t *testing.T) { @@ -1358,7 +1358,7 @@ func TestErrorConditionAfterErrorAnalysisRunBackground(t *testing.T) { condition := generateConditionsPatch(true, conditions.RolloutAbortedReason, r2, false, "", false) now := timeutil.Now().UTC().Format(time.RFC3339) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition, now, errmsg)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition, now, errmsg)), patch) } func TestCancelAnalysisRunsWhenAborted(t *testing.T) { @@ -1419,7 +1419,7 @@ func TestCancelAnalysisRunsWhenAborted(t *testing.T) { }` errmsg := fmt.Sprintf(conditions.RolloutAbortedMessage, 2) now := timeutil.Now().UTC().Format(time.RFC3339) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, newConditions, now, errmsg)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, newConditions, now, errmsg)), patch) } func TestCancelBackgroundAnalysisRunWhenRolloutIsCompleted(t *testing.T) { @@ -1521,7 +1521,7 @@ func TestDoNotCreateBackgroundAnalysisRunAfterInconclusiveRun(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestDoNotCreateBackgroundAnalysisRunOnNewCanaryRollout(t *testing.T) { @@ -1647,7 +1647,7 @@ func TestCreatePrePromotionAnalysisRun(t *testing.T) { } } }`, ar.Name) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } // TestDoNotCreatePrePromotionAnalysisProgressedRollout ensures a pre-promotion analysis is not created after a Rollout @@ -1771,7 +1771,7 @@ func TestDoNotCreatePrePromotionAnalysisRunOnNotReadyReplicaSet(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchRolloutIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestRolloutPrePromotionAnalysisBecomesInconclusive(t *testing.T) { @@ -1841,7 +1841,7 @@ func TestRolloutPrePromotionAnalysisBecomesInconclusive(t *testing.T) { } } }`, now, now) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestRolloutPrePromotionAnalysisSwitchServiceAfterSuccess(t *testing.T) { @@ -1905,7 +1905,7 @@ func TestRolloutPrePromotionAnalysisSwitchServiceAfterSuccess(t *testing.T) { "message": null } }`, rs2PodHash, rs2PodHash, rs2PodHash) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestRolloutPrePromotionAnalysisHonorAutoPromotionSeconds(t *testing.T) { @@ -1971,7 +1971,7 @@ func TestRolloutPrePromotionAnalysisHonorAutoPromotionSeconds(t *testing.T) { "message": null } }`, rs2PodHash, rs2PodHash, rs2PodHash) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestRolloutPrePromotionAnalysisDoNothingOnInconclusiveAnalysis(t *testing.T) { @@ -2096,7 +2096,7 @@ func TestAbortRolloutOnErrorPrePromotionAnalysis(t *testing.T) { now := timeutil.MetaNow().UTC().Format(time.RFC3339) progressingFalseAborted, _ := newProgressingCondition(conditions.RolloutAbortedReason, r2, "") newConditions := updateConditionsPatch(*r2, progressingFalseAborted) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, now, newConditions, conditions.RolloutAbortedReason, progressingFalseAborted.Message)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, now, newConditions, conditions.RolloutAbortedReason, progressingFalseAborted.Message)), patch) } func TestCreatePostPromotionAnalysisRun(t *testing.T) { @@ -2143,7 +2143,7 @@ func TestCreatePostPromotionAnalysisRun(t *testing.T) { } } }`, ar.Name) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestRolloutPostPromotionAnalysisSuccess(t *testing.T) { @@ -2199,7 +2199,7 @@ func TestRolloutPostPromotionAnalysisSuccess(t *testing.T) { "message": null } }`, rs2PodHash) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } // TestPostPromotionAnalysisRunHandleInconclusive ensures that the Rollout does not scale down a old ReplicaSet if @@ -2264,7 +2264,7 @@ func TestPostPromotionAnalysisRunHandleInconclusive(t *testing.T) { "message": "InconclusiveAnalysisRun" } }`) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestAbortRolloutOnErrorPostPromotionAnalysis(t *testing.T) { @@ -2334,7 +2334,7 @@ func TestAbortRolloutOnErrorPostPromotionAnalysis(t *testing.T) { now := timeutil.MetaNow().UTC().Format(time.RFC3339) progressingFalseAborted, _ := newProgressingCondition(conditions.RolloutAbortedReason, r2, "") newConditions := updateConditionsPatch(*r2, progressingFalseAborted) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, now, newConditions, conditions.RolloutAbortedReason, progressingFalseAborted.Message)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, now, newConditions, conditions.RolloutAbortedReason, progressingFalseAborted.Message)), patch) } func TestCreateAnalysisRunWithCustomAnalysisRunMetadataAndROCopyLabels(t *testing.T) { diff --git a/rollout/bluegreen_test.go b/rollout/bluegreen_test.go index 42b521a565..cff894e8ca 100644 --- a/rollout/bluegreen_test.go +++ b/rollout/bluegreen_test.go @@ -290,7 +290,7 @@ func TestBlueGreenHandlePause(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchRolloutIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) }) t.Run("AddPause", func(t *testing.T) { f := newFixture(t) @@ -334,7 +334,7 @@ func TestBlueGreenHandlePause(t *testing.T) { } }` now := timeutil.Now().UTC().Format(time.RFC3339) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, v1alpha1.PauseReasonBlueGreenPause, now)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, v1alpha1.PauseReasonBlueGreenPause, now)), patch) }) @@ -376,7 +376,7 @@ func TestBlueGreenHandlePause(t *testing.T) { } }` addedConditions := generateConditionsPatchWithPause(true, conditions.RolloutPausedReason, rs2, true, "", true, false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, addedConditions)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, addedConditions)), patch) }) t.Run("NoActionsAfterPausing", func(t *testing.T) { @@ -417,7 +417,7 @@ func TestBlueGreenHandlePause(t *testing.T) { patchIndex := f.expectPatchRolloutActionWithPatch(r2, OnlyObservedGenerationPatch) f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) }) t.Run("NoActionsAfterPausedOnInconclusiveRun", func(t *testing.T) { @@ -468,7 +468,7 @@ func TestBlueGreenHandlePause(t *testing.T) { patchIndex := f.expectPatchRolloutActionWithPatch(r2, OnlyObservedGenerationPatch) f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) }) t.Run("NoAutoPromoteBeforeDelayTimePasses", func(t *testing.T) { @@ -509,7 +509,7 @@ func TestBlueGreenHandlePause(t *testing.T) { patchIndex := f.expectPatchRolloutActionWithPatch(r2, OnlyObservedGenerationPatch) f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) }) t.Run("AutoPromoteAfterDelayTimePasses", func(t *testing.T) { @@ -813,7 +813,7 @@ func TestBlueGreenHandlePause(t *testing.T) { "conditions": %s } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedUnpausePatch, unpauseConditions)), unpausePatch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedUnpausePatch, unpauseConditions)), unpausePatch) generatedConditions := generateConditionsPatchWithCompleted(true, conditions.ReplicaSetUpdatedReason, rs2, true, "", true) expected2ndPatchWithoutSubs := `{ @@ -1453,7 +1453,7 @@ func TestBlueGreenAbort(t *testing.T) { } }`, rs1PodHash, expectedConditions, rs1PodHash, conditions.RolloutAbortedReason, fmt.Sprintf(conditions.RolloutAbortedMessage, 2)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestBlueGreenHandlePauseAutoPromoteWithConditions(t *testing.T) { diff --git a/rollout/canary_test.go b/rollout/canary_test.go index e3bffff2dd..4adca3fcb9 100644 --- a/rollout/canary_test.go +++ b/rollout/canary_test.go @@ -182,7 +182,7 @@ func TestCanaryRolloutEnterPauseState(t *testing.T) { now := timeutil.MetaNow().UTC().Format(time.RFC3339) expectedPatchWithoutObservedGen := fmt.Sprintf(expectedPatchTemplate, v1alpha1.PauseReasonCanaryPauseStep, now, conditions, v1alpha1.PauseReasonCanaryPauseStep) expectedPatch := calculatePatch(r2, expectedPatchWithoutObservedGen) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } func TestCanaryRolloutNoProgressWhilePaused(t *testing.T) { @@ -257,7 +257,7 @@ func TestCanaryRolloutUpdatePauseConditionWhilePaused(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRollout(addPausedConditionPatch) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestCanaryRolloutResetProgressDeadlineOnRetry(t *testing.T) { @@ -300,7 +300,7 @@ func TestCanaryRolloutResetProgressDeadlineOnRetry(t *testing.T) { "message": "more replicas need to be updated" } }`, retryCondition) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestCanaryRolloutIncrementStepAfterUnPaused(t *testing.T) { @@ -342,7 +342,7 @@ func TestCanaryRolloutIncrementStepAfterUnPaused(t *testing.T) { }` generatedConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, rs2, false, "", false) expectedPatch := calculatePatch(r2, fmt.Sprintf(expectedPatchTemplate, generatedConditions)) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } func TestCanaryRolloutUpdateStatusWhenAtEndOfSteps(t *testing.T) { @@ -383,7 +383,7 @@ func TestCanaryRolloutUpdateStatusWhenAtEndOfSteps(t *testing.T) { }` expectedPatch := fmt.Sprintf(expectedPatchWithoutStableRS, expectedStableRS, generateConditionsPatchWithCompleted(true, conditions.ReplicaSetUpdatedReason, rs2, false, "", true)) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestResetCurrentStepIndexOnStepChange(t *testing.T) { @@ -426,7 +426,7 @@ func TestResetCurrentStepIndexOnStepChange(t *testing.T) { }` newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) expectedPatch := fmt.Sprintf(expectedPatchWithoutPodHash, expectedCurrentPodHash, expectedCurrentStepHash, newConditions) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestResetCurrentStepIndexOnPodSpecChange(t *testing.T) { @@ -467,7 +467,7 @@ func TestResetCurrentStepIndexOnPodSpecChange(t *testing.T) { newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) expectedPatch := fmt.Sprintf(expectedPatchWithoutPodHash, expectedCurrentPodHash, newConditions) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestCanaryRolloutCreateFirstReplicasetNoSteps(t *testing.T) { @@ -505,7 +505,7 @@ func TestCanaryRolloutCreateFirstReplicasetNoSteps(t *testing.T) { newConditions := generateConditionsPatchWithCompleted(false, conditions.ReplicaSetUpdatedReason, rs, false, "", true) - assert.Equal(t, calculatePatch(r, fmt.Sprintf(expectedPatch, newConditions)), patch) + assert.JSONEq(t, calculatePatch(r, fmt.Sprintf(expectedPatch, newConditions)), patch) } func TestCanaryRolloutCreateFirstReplicasetWithSteps(t *testing.T) { @@ -545,7 +545,7 @@ func TestCanaryRolloutCreateFirstReplicasetWithSteps(t *testing.T) { }` expectedPatch := fmt.Sprintf(expectedPatchWithSub, generateConditionsPatchWithCompleted(false, conditions.ReplicaSetUpdatedReason, rs, false, "", true)) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } func TestCanaryRolloutCreateNewReplicaWithCorrectWeight(t *testing.T) { @@ -843,7 +843,7 @@ func TestRollBackToStable(t *testing.T) { newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, rs1, false, "", true) expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, hash.ComputePodTemplateHash(&r2.Spec.Template, r2.Status.CollisionCount), newConditions) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestRollBackToActiveReplicaSetWithinWindow(t *testing.T) { @@ -935,7 +935,7 @@ func TestGradualShiftToNewStable(t *testing.T) { newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, newConditions) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestRollBackToStableAndStepChange(t *testing.T) { @@ -983,7 +983,7 @@ func TestRollBackToStableAndStepChange(t *testing.T) { newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, rs1, false, "", true) expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, newPodHash, newStepHash, newConditions) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestCanaryRolloutIncrementStepIfSetWeightsAreCorrect(t *testing.T) { @@ -1019,7 +1019,7 @@ func TestCanaryRolloutIncrementStepIfSetWeightsAreCorrect(t *testing.T) { } }` newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, rs3, false, "", false) - assert.Equal(t, calculatePatch(r3, fmt.Sprintf(expectedPatch, newConditions)), patch) + assert.JSONEq(t, calculatePatch(r3, fmt.Sprintf(expectedPatch, newConditions)), patch) } func TestSyncRolloutWaitAddToQueue(t *testing.T) { @@ -1171,7 +1171,7 @@ func TestSyncRolloutWaitIncrementStepIndex(t *testing.T) { "currentStepIndex":2 } }` - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestCanaryRolloutStatusHPAStatusFields(t *testing.T) { @@ -1215,7 +1215,7 @@ func TestCanaryRolloutStatusHPAStatusFields(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRolloutWithoutConditions(index) - assert.Equal(t, calculatePatch(r2, expectedPatchWithSub), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatchWithSub), patch) } func TestCanaryRolloutWithCanaryService(t *testing.T) { @@ -1656,7 +1656,7 @@ func TestCanaryRolloutScaleWhilePaused(t *testing.T) { patch := f.getPatchedRolloutWithoutConditions(patchIndex) expectedPatch := calculatePatch(r2, OnlyObservedGenerationPatch) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } func TestResumeRolloutAfterPauseDuration(t *testing.T) { @@ -1756,7 +1756,7 @@ func TestNoResumeAfterPauseDurationIfUserPaused(t *testing.T) { "message": "manually paused" } }` - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestHandleNilNewRSOnScaleAndImageChange(t *testing.T) { @@ -1803,7 +1803,7 @@ func TestHandleNilNewRSOnScaleAndImageChange(t *testing.T) { patchIndex := f.expectPatchRolloutAction(r2) f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestHandleCanaryAbort(t *testing.T) { @@ -1850,10 +1850,10 @@ func TestHandleCanaryAbort(t *testing.T) { }` errmsg := fmt.Sprintf(conditions.RolloutAbortedMessage, 2) newConditions := generateConditionsPatch(true, conditions.RolloutAbortedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, newConditions, conditions.RolloutAbortedReason, errmsg)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, newConditions, conditions.RolloutAbortedReason, errmsg)), patch) }) - t.Run("Do not reset currentStepCount if newRS is stableRS", func(t *testing.T) { + t.Run("Do not reset currentStepCount and reset abort if newRS is stableRS", func(t *testing.T) { f := newFixture(t) defer f.Close() @@ -1881,13 +1881,12 @@ func TestHandleCanaryAbort(t *testing.T) { patch := f.getPatchedRollout(patchIndex) expectedPatch := `{ "status":{ - "conditions": %s, - "phase": "Degraded", - "message": "%s: %s" + "abort": null, + "abortedAt": null, + "conditions": %s } }` - errmsg := fmt.Sprintf(conditions.RolloutAbortedMessage, 1) - newConditions := generateConditionsPatch(true, conditions.RolloutAbortedReason, r1, false, "", true) - assert.Equal(t, calculatePatch(r1, fmt.Sprintf(expectedPatch, newConditions, conditions.RolloutAbortedReason, errmsg)), patch) + newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r1, false, "", true) + assert.JSONEq(t, calculatePatch(r1, fmt.Sprintf(expectedPatch, newConditions)), patch) }) } diff --git a/rollout/controller.go b/rollout/controller.go index 5824512271..ebc17c1303 100644 --- a/rollout/controller.go +++ b/rollout/controller.go @@ -56,6 +56,7 @@ import ( logutil "github.com/argoproj/argo-rollouts/utils/log" "github.com/argoproj/argo-rollouts/utils/record" replicasetutil "github.com/argoproj/argo-rollouts/utils/replicaset" + rolloututil "github.com/argoproj/argo-rollouts/utils/rollout" serviceutil "github.com/argoproj/argo-rollouts/utils/service" timeutil "github.com/argoproj/argo-rollouts/utils/time" unstructuredutil "github.com/argoproj/argo-rollouts/utils/unstructured" @@ -520,6 +521,10 @@ func (c *Controller) newRolloutContext(rollout *v1alpha1.Rollout) (*rolloutConte }, reconcilerBase: c.reconcilerBase, } + if rolloututil.IsFullyPromoted(rollout) && roCtx.pauseContext.IsAborted() { + logCtx.Warnf("Removing abort condition from fully promoted rollout") + roCtx.pauseContext.RemoveAbort() + } // carry over existing recorded weights roCtx.newStatus.Canary.Weights = rollout.Status.Canary.Weights return &roCtx, nil diff --git a/rollout/controller_test.go b/rollout/controller_test.go index d37cdc24cd..a637d68f29 100644 --- a/rollout/controller_test.go +++ b/rollout/controller_test.go @@ -1346,7 +1346,7 @@ func TestSwitchInvalidSpecMessage(t *testing.T) { expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, progressingCond, string(invalidSpecBytes), conditions.InvalidSpecReason, strings.ReplaceAll(errmsg, "\"", "\\\"")) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } // TestPodTemplateHashEquivalence verifies the hash is computed consistently when there are slight @@ -1549,7 +1549,7 @@ func TestSwitchBlueGreenToCanary(t *testing.T) { "selector": "foo=bar" } }`, addedConditions, conditions.ComputeStepHash(r)) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } func newInvalidSpecCondition(reason string, resourceObj runtime.Object, optionalMessage string) (v1alpha1.RolloutCondition, string) { diff --git a/rollout/experiment_test.go b/rollout/experiment_test.go index bcd10cad92..233dd16ca5 100644 --- a/rollout/experiment_test.go +++ b/rollout/experiment_test.go @@ -69,7 +69,7 @@ func TestRolloutCreateExperiment(t *testing.T) { } }` conds := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ex.Name, conds)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ex.Name, conds)), patch) } func TestRolloutCreateClusterTemplateExperiment(t *testing.T) { @@ -126,7 +126,7 @@ func TestRolloutCreateClusterTemplateExperiment(t *testing.T) { } }` conds := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ex.Name, conds)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ex.Name, conds)), patch) } func TestCreateExperimentWithCollision(t *testing.T) { @@ -178,7 +178,7 @@ func TestCreateExperimentWithCollision(t *testing.T) { } }` conds := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, createdEx.Name, conds)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, createdEx.Name, conds)), patch) } func TestCreateExperimentWithCollisionAndSemanticEquality(t *testing.T) { @@ -229,7 +229,7 @@ func TestCreateExperimentWithCollisionAndSemanticEquality(t *testing.T) { } }` conds := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ex.Name, conds)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ex.Name, conds)), patch) } func TestRolloutExperimentProcessingDoNothing(t *testing.T) { @@ -267,7 +267,7 @@ func TestRolloutExperimentProcessingDoNothing(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } @@ -314,7 +314,7 @@ func TestAbortRolloutAfterFailedExperiment(t *testing.T) { }` now := timeutil.Now().UTC().Format(time.RFC3339) generatedConditions := generateConditionsPatch(true, conditions.RolloutAbortedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, now, generatedConditions, conditions.RolloutAbortedReason, fmt.Sprintf(conditions.RolloutAbortedMessage, 2))), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, now, generatedConditions, conditions.RolloutAbortedReason, fmt.Sprintf(conditions.RolloutAbortedMessage, 2))), patch) } func TestPauseRolloutAfterInconclusiveExperiment(t *testing.T) { @@ -481,7 +481,7 @@ func TestRolloutExperimentFinishedIncrementStep(t *testing.T) { }` generatedConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, rs2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, generatedConditions)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, generatedConditions)), patch) } func TestRolloutDoNotCreateExperimentWithoutStableRS(t *testing.T) { diff --git a/rollout/service_test.go b/rollout/service_test.go index 393faf87a0..e29ee53b4a 100644 --- a/rollout/service_test.go +++ b/rollout/service_test.go @@ -144,7 +144,7 @@ func TestActiveServiceNotFound(t *testing.T) { } }` _, pausedCondition := newInvalidSpecCondition(conditions.InvalidSpecReason, notUsedActiveSvc, errmsg) - assert.Equal(t, calculatePatch(r, fmt.Sprintf(expectedPatch, pausedCondition, conditions.InvalidSpecReason, strings.ReplaceAll(errmsg, "\"", "\\\""))), patch) + assert.JSONEq(t, calculatePatch(r, fmt.Sprintf(expectedPatch, pausedCondition, conditions.InvalidSpecReason, strings.ReplaceAll(errmsg, "\"", "\\\""))), patch) } func TestPreviewServiceNotFound(t *testing.T) { @@ -173,7 +173,7 @@ func TestPreviewServiceNotFound(t *testing.T) { } }` _, pausedCondition := newInvalidSpecCondition(conditions.InvalidSpecReason, notUsedPreviewSvc, errmsg) - assert.Equal(t, calculatePatch(r, fmt.Sprintf(expectedPatch, pausedCondition, conditions.InvalidSpecReason, strings.ReplaceAll(errmsg, "\"", "\\\""))), patch) + assert.JSONEq(t, calculatePatch(r, fmt.Sprintf(expectedPatch, pausedCondition, conditions.InvalidSpecReason, strings.ReplaceAll(errmsg, "\"", "\\\""))), patch) } diff --git a/test/e2e/istio_test.go b/test/e2e/istio_test.go index 2f993f09bc..7ecbd66fdf 100644 --- a/test/e2e/istio_test.go +++ b/test/e2e/istio_test.go @@ -303,7 +303,7 @@ func (s *IstioSuite) TestIstioAbortUpdate() { Then(). When(). AbortRollout(). - WaitForRolloutStatus("Degraded"). + WaitForRolloutStatus("Healthy"). Then(). ExpectRevisionPodCount("1", 1). When(). @@ -316,7 +316,7 @@ func (s *IstioSuite) TestIstioAbortUpdate() { Then(). When(). AbortRollout(). - WaitForRolloutStatus("Degraded"). + WaitForRolloutStatus("Healthy"). Then(). ExpectRevisionPodCount("2", 1) } From 8100799b9b1739f0503b76add19ff26652d29bb8 Mon Sep 17 00:00:00 2001 From: Zubair Haque Date: Mon, 2 Oct 2023 16:37:30 -0500 Subject: [PATCH 033/187] chore: updating getCanaryConfigId to be more efficient with better error handling (#3070) updating getCanaryConfigId to be more efficient with better error handling Signed-off-by: zhaque44 Signed-off-by: Philip Clark --- metricproviders/kayenta/kayenta.go | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/metricproviders/kayenta/kayenta.go b/metricproviders/kayenta/kayenta.go index 79f47c5f28..b623aa7730 100644 --- a/metricproviders/kayenta/kayenta.go +++ b/metricproviders/kayenta/kayenta.go @@ -67,26 +67,20 @@ func (p *Provider) GetMetadata(metric v1alpha1.Metric) map[string]string { } func getCanaryConfigId(metric v1alpha1.Metric, p *Provider) (string, error) { - configIdLookupURL := fmt.Sprintf(configIdLookupURLFormat, metric.Provider.Kayenta.Address, metric.Provider.Kayenta.Application, metric.Provider.Kayenta.StorageAccountName) response, err := p.client.Get(configIdLookupURL) - if err != nil || response.Body == nil || response.StatusCode != 200 { - if err == nil { - err = errors.New("Invalid Response") - } + if err != nil { return "", err } + defer response.Body.Close() - data, err := io.ReadAll(response.Body) - if err != nil { - return "", err + if response.StatusCode != 200 { + return "", fmt.Errorf("Invalid Response: HTTP %d", response.StatusCode) } var cc []canaryConfig - - err = json.Unmarshal(data, &cc) - if err != nil { + if err := json.NewDecoder(response.Body).Decode(&cc); err != nil { return "", err } @@ -96,7 +90,7 @@ func getCanaryConfigId(metric v1alpha1.Metric, p *Provider) (string, error) { } } - return "", err + return "", errors.New("Canary config not found") } // Run queries kayentd for the metric From 2d901a705e74f88229895e4bc4c1221b6483ef80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:37:52 -0500 Subject: [PATCH 034/187] chore(deps): bump github.com/hashicorp/go-plugin from 1.5.1 to 1.5.2 (#3056) Bumps [github.com/hashicorp/go-plugin](https://github.com/hashicorp/go-plugin) from 1.5.1 to 1.5.2. - [Release notes](https://github.com/hashicorp/go-plugin/releases) - [Changelog](https://github.com/hashicorp/go-plugin/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/go-plugin/compare/v1.5.1...v1.5.2) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6fcf264f9c..25a4d14444 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.3 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/hashicorp/go-plugin v1.5.1 + github.com/hashicorp/go-plugin v1.5.2 github.com/influxdata/influxdb-client-go/v2 v2.12.3 github.com/juju/ansiterm v1.0.0 github.com/machinebox/graphql v0.2.2 diff --git a/go.sum b/go.sum index f0a32df12b..8b00f1d6f5 100644 --- a/go.sum +++ b/go.sum @@ -402,8 +402,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.14.1 h1:nQcJDQwIAGnmoUWp8ubocEX40cCml/17YkF6csQLReU= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-plugin v1.5.1 h1:oGm7cWBaYIp3lJpx1RUEfLWophprE2EV/KUeqBYo+6k= -github.com/hashicorp/go-plugin v1.5.1/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.1/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= From dde5fe4439960f10fcbf6b54e558f21a972dd9fa Mon Sep 17 00:00:00 2001 From: Jesse Suen Date: Wed, 4 Oct 2023 06:14:01 -0700 Subject: [PATCH 035/187] fix: inopportune scaling events would lose some status fields (#3060) fix: inopportune scaling events would result in loss of data Signed-off-by: Jesse Suen Signed-off-by: Philip Clark --- rollout/sync.go | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/rollout/sync.go b/rollout/sync.go index 98990b4596..f13a3489c7 100644 --- a/rollout/sync.go +++ b/rollout/sync.go @@ -274,10 +274,11 @@ func (c *rolloutContext) syncReplicasOnly() error { if err != nil { return err } + newStatus := c.rollout.Status.DeepCopy() // NOTE: it is possible for newRS to be nil (e.g. when template and replicas changed at same time) if c.rollout.Spec.Strategy.BlueGreen != nil { - previewSvc, activeSvc, err := c.getPreviewAndActiveServices() + _, activeSvc, err := c.getPreviewAndActiveServices() if err != nil { return nil } @@ -286,7 +287,15 @@ func (c *rolloutContext) syncReplicasOnly() error { // so we can abort this resync return err } - return c.syncRolloutStatusBlueGreen(previewSvc, activeSvc) + activeRS, _ := replicasetutil.GetReplicaSetByTemplateHash(c.allRSs, newStatus.BlueGreen.ActiveSelector) + if activeRS != nil { + newStatus.HPAReplicas = activeRS.Status.Replicas + newStatus.AvailableReplicas = activeRS.Status.AvailableReplicas + } else { + // when we do not have an active replicaset, accounting is done on the default rollout selector + newStatus.HPAReplicas = replicasetutil.GetActualReplicaCountForReplicaSets(c.allRSs) + newStatus.AvailableReplicas = replicasetutil.GetAvailableReplicaCountForReplicaSets(c.allRSs) + } } // The controller wants to use the rolloutCanary method to reconcile the rollout if the rollout is not paused. // If there are no scaling events, the rollout should only sync its status @@ -296,9 +305,10 @@ func (c *rolloutContext) syncReplicasOnly() error { // so we can abort this resync return err } - return c.syncRolloutStatusCanary() + newStatus.AvailableReplicas = replicasetutil.GetAvailableReplicaCountForReplicaSets(c.allRSs) + newStatus.HPAReplicas = replicasetutil.GetActualReplicaCountForReplicaSets(c.allRSs) } - return fmt.Errorf("no rollout strategy provided") + return c.persistRolloutStatus(newStatus) } // isScalingEvent checks whether the provided rollout has been updated with a scaling event From a4e871dee5208592b0236c9115589c1f28ef41bf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 08:14:24 -0500 Subject: [PATCH 036/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.42 to 1.18.43 (#3072) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.42 to 1.18.43. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.42...config/v1.18.43) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 25a4d14444..8e9b03f62b 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.42 + github.com/aws/aws-sdk-go-v2/config v1.18.43 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,15 +82,15 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.40 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.41 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect diff --git a/go.sum b/go.sum index 8b00f1d6f5..764feeed8d 100644 --- a/go.sum +++ b/go.sum @@ -105,10 +105,10 @@ github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WN github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.42 h1:28jHROB27xZwU0CB88giDSjz7M1Sba3olb5JBGwina8= -github.com/aws/aws-sdk-go-v2/config v1.18.42/go.mod h1:4AZM3nMMxwlG+eZlxvBKqwVbkDLlnN2a4UGTL6HjaZI= -github.com/aws/aws-sdk-go-v2/credentials v1.13.40 h1:s8yOkDh+5b1jUDhMBtngF6zKWLDs84chUk2Vk0c38Og= -github.com/aws/aws-sdk-go-v2/credentials v1.13.40/go.mod h1:VtEHVAAqDWASwdOqj/1huyT6uHbs5s8FUHfDQdky/Rs= +github.com/aws/aws-sdk-go-v2/config v1.18.43 h1:IgdUtTRvUDC6eiJBqU6vh7bHFNAEBjQ8S+qJ7zVhDOs= +github.com/aws/aws-sdk-go-v2/config v1.18.43/go.mod h1:NiFev8qlgg8MPzw3fO/EwzMZeZwlJEKGwfpjRPA9Nvw= +github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9rmEzEhbZFh9JQW/Bg= +github.com/aws/aws-sdk-go-v2/credentials v1.13.41/go.mod h1:cc3Fn7DkKbJalPtQnudHGZZ8ml9+hwtbc1CJONsYYqk= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= @@ -123,12 +123,12 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeo github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 h1:YkNzx1RLS0F5qdf9v1Q8Cuv9NXCL2TkosOxhzlUPV64= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.1/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 h1:vuGK1vHNP9zx0PfOrtPumbwR2af0ATQ1Z2H6p75AgRQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= -github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk= -github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= From 20dce0047c70341bee326b6c3936744a04e4cc26 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Thu, 5 Oct 2023 08:14:05 -0600 Subject: [PATCH 037/187] fix: sync notification controller configmaps/secrets first (#3075) sync notification controller configmaps/secrets first before starting other informers Signed-off-by: zachaller Signed-off-by: Philip Clark --- controller/controller.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/controller/controller.go b/controller/controller.go index 5429cfe743..afe4bc769b 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -463,6 +463,12 @@ func (c *Manager) startLeading(ctx context.Context, rolloutThreadiness, serviceT // Start the informer factories to begin populating the informer caches log.Info("Starting Controllers") + c.notificationConfigMapInformerFactory.Start(ctx.Done()) + c.notificationSecretInformerFactory.Start(ctx.Done()) + if ok := cache.WaitForCacheSync(ctx.Done(), c.configMapSynced, c.secretSynced); !ok { + log.Fatalf("failed to wait for configmap/secret caches to sync, exiting") + } + // notice that there is no need to run Start methods in a separate goroutine. (i.e. go kubeInformerFactory.Start(stopCh) // Start method is non-blocking and runs all registered informers in a dedicated goroutine. c.dynamicInformerFactory.Start(ctx.Done()) @@ -471,9 +477,6 @@ func (c *Manager) startLeading(ctx context.Context, rolloutThreadiness, serviceT } c.kubeInformerFactory.Start(ctx.Done()) - c.notificationConfigMapInformerFactory.Start(ctx.Done()) - c.notificationSecretInformerFactory.Start(ctx.Done()) - c.jobInformerFactory.Start(ctx.Done()) // Check if Istio installed on cluster before starting dynamicInformerFactory From a3d2a029c3bfba3e51f3860e0d11b12bc2c00fc0 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Thu, 5 Oct 2023 10:30:50 -0600 Subject: [PATCH 038/187] fix: missing notification on error (#3076) * fix: missing notification on error Signed-off-by: zachaller * fix tests Signed-off-by: zachaller * aggregate errors Signed-off-by: zachaller * fix bad stat counts Signed-off-by: zachaller * return errors Signed-off-by: zachaller * fix tests on return of errors Signed-off-by: zachaller * change case on logs Signed-off-by: zachaller * missed a case Signed-off-by: zachaller --------- Signed-off-by: zachaller Signed-off-by: Philip Clark --- utils/record/record.go | 40 ++++++++++++++++++++++++------------- utils/record/record_test.go | 14 ++++++------- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/utils/record/record.go b/utils/record/record.go index d2bd322acf..859b954390 100644 --- a/utils/record/record.go +++ b/utils/record/record.go @@ -218,9 +218,7 @@ func (e *EventRecorderAdapter) defaultEventf(object runtime.Object, warn bool, o err := e.sendNotifications(api, object, opts) if err != nil { logCtx.Errorf("Notifications failed to send for eventReason %s with error: %s", opts.EventReason, err) - e.NotificationFailedCounter.WithLabelValues(namespace, name, opts.EventType, opts.EventReason).Inc() } - e.NotificationSuccessCounter.WithLabelValues(namespace, name, opts.EventType, opts.EventReason).Inc() } } @@ -248,7 +246,7 @@ func NewAPIFactorySettings() api.Settings { } // Send notifications for triggered event if user is subscribed -func (e *EventRecorderAdapter) sendNotifications(notificationsAPI api.API, object runtime.Object, opts EventOptions) error { +func (e *EventRecorderAdapter) sendNotifications(notificationsAPI api.API, object runtime.Object, opts EventOptions) []error { logCtx := logutil.WithObject(object) _, namespace, name := logutil.KindNamespaceName(logCtx) startTime := timeutil.Now() @@ -259,7 +257,7 @@ func (e *EventRecorderAdapter) sendNotifications(notificationsAPI api.API, objec }() if notificationsAPI == nil { - return fmt.Errorf("notificationsAPI is nil") + return []error{fmt.Errorf("NotificationsAPI is nil")} } cfg := notificationsAPI.GetConfig() @@ -274,39 +272,53 @@ func (e *EventRecorderAdapter) sendNotifications(notificationsAPI api.API, objec objMap, err := toObjectMap(object) if err != nil { - return err + return []error{err} } emptyCondition := hash("") + // We should not return in these loops because we want other configured notifications to still send if they can. + errors := []error{} for _, destination := range destinations { res, err := notificationsAPI.RunTrigger(trigger, objMap) if err != nil { - log.Errorf("Failed to execute condition of trigger %s: %v", trigger, err) - return err + log.Errorf("Failed to run trigger, trigger: %s, destination: %s, namespace config: %s : %v", + trigger, destination, notificationsAPI.GetConfig().Namespace, err) + errors = append(errors, err) + continue } log.Infof("Trigger %s result: %v", trigger, res) for _, c := range res { - log.Infof("Res When Condition hash: %s, Templates: %s", c.Key, c.Templates) + log.Infof("Result when condition hash: %s, templates: %s", c.Key, c.Templates) s := strings.Split(c.Key, ".")[1] if s != emptyCondition && c.Triggered == true { err = notificationsAPI.Send(objMap, c.Templates, destination) if err != nil { - log.Errorf("notification error: %s", err.Error()) - return err + log.Errorf("Failed to execute the sending of notification on not empty condition, trigger: %s, destination: %s, namespace config: %s : %v", + trigger, destination, notificationsAPI.GetConfig().Namespace, err) + e.NotificationFailedCounter.WithLabelValues(namespace, name, opts.EventType, opts.EventReason).Inc() + errors = append(errors, err) + continue } + e.NotificationSuccessCounter.WithLabelValues(namespace, name, opts.EventType, opts.EventReason).Inc() } else if s == emptyCondition { err = notificationsAPI.Send(objMap, c.Templates, destination) if err != nil { - log.Errorf("notification error: %s", err.Error()) - return err + log.Errorf("Failed to execute the sending of notification on empty condition, trigger: %s, destination: %s, namespace config: %s : %v", + trigger, destination, notificationsAPI.GetConfig().Namespace, err) + e.NotificationFailedCounter.WithLabelValues(namespace, name, opts.EventType, opts.EventReason).Inc() + errors = append(errors, err) + continue } + e.NotificationSuccessCounter.WithLabelValues(namespace, name, opts.EventType, opts.EventReason).Inc() } } } - - return nil + if len(errors) == 0 { + return nil + } + return errors } // This function is copied over from notification engine to make sure we honour emptyCondition diff --git a/utils/record/record_test.go b/utils/record/record_test.go index 6c494a3ac7..97f4452441 100644 --- a/utils/record/record_test.go +++ b/utils/record/record_test.go @@ -113,7 +113,7 @@ func TestSendNotifications(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory //ch := make(chan prometheus.HistogramVec, 1) err := rec.sendNotifications(mockAPI, &r, EventOptions{EventReason: "FooReason"}) - assert.NoError(t, err) + assert.Nil(t, err) } func TestSendNotificationsWhenCondition(t *testing.T) { @@ -140,7 +140,7 @@ func TestSendNotificationsWhenCondition(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory //ch := make(chan prometheus.HistogramVec, 1) err := rec.sendNotifications(mockAPI, &r, EventOptions{EventReason: "FooReason"}) - assert.NoError(t, err) + assert.Nil(t, err) } func TestSendNotificationsWhenConditionTime(t *testing.T) { @@ -340,7 +340,7 @@ func TestSendNotificationsFails(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory err := rec.sendNotifications(mockAPI, &r, EventOptions{EventReason: "FooReason"}) - assert.Error(t, err) + assert.Len(t, err, 1) }) t.Run("GetAPIError", func(t *testing.T) { @@ -349,7 +349,7 @@ func TestSendNotificationsFails(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory err := rec.sendNotifications(nil, &r, EventOptions{EventReason: "FooReason"}) - assert.Error(t, err) + assert.NotNil(t, err) }) } @@ -380,7 +380,7 @@ func TestSendNotificationsFailsWithRunTriggerError(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory err := rec.sendNotifications(mockAPI, &r, EventOptions{EventReason: "FooReason"}) - assert.Error(t, err) + assert.Len(t, err, 1) }) t.Run("GetAPIError", func(t *testing.T) { @@ -389,7 +389,7 @@ func TestSendNotificationsFailsWithRunTriggerError(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory err := rec.sendNotifications(nil, &r, EventOptions{EventReason: "FooReason"}) - assert.Error(t, err) + assert.NotNil(t, err) }) } @@ -419,7 +419,7 @@ func TestSendNotificationsNoTrigger(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory err := rec.sendNotifications(mockAPI, &r, EventOptions{EventReason: "MissingReason"}) - assert.Error(t, err) + assert.Len(t, err, 1) } func TestNewAPIFactorySettings(t *testing.T) { From e0e71d35b2aa63a91ef238dc3094167c29d17a63 Mon Sep 17 00:00:00 2001 From: "Yuan (Terry) Tang" Date: Mon, 9 Oct 2023 18:56:48 -0400 Subject: [PATCH 039/187] fix: Replace antonmedv/expr with expr-lang/expr (#3090) Signed-off-by: Yuan Tang Signed-off-by: Philip Clark --- go.mod | 1 + go.sum | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 8e9b03f62b..dcf303cccb 100644 --- a/go.mod +++ b/go.mod @@ -199,6 +199,7 @@ require ( ) replace ( + github.com/antonmedv/expr => github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 k8s.io/api v0.0.0 => k8s.io/api v0.25.8 k8s.io/apiextensions-apiserver v0.0.0 => k8s.io/apiextensions-apiserver v0.25.8 diff --git a/go.sum b/go.sum index 764feeed8d..6aa0f675cf 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,6 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= -github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= @@ -210,6 +208,8 @@ github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0n github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= +github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 h1:Sg2XxaymeyqqaLG34aB2mvlX+nii916/Gv1ovWc4jMc= +github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= From 0f7850ac9b98c9c1d53dc125d035db50e0765682 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Wed, 11 Oct 2023 07:04:30 -0600 Subject: [PATCH 040/187] fix: revert repo change to expr (#3094) revert repo change to expr Signed-off-by: zachaller Signed-off-by: Philip Clark --- go.mod | 1 - go.sum | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index dcf303cccb..8e9b03f62b 100644 --- a/go.mod +++ b/go.mod @@ -199,7 +199,6 @@ require ( ) replace ( - github.com/antonmedv/expr => github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 k8s.io/api v0.0.0 => k8s.io/api v0.25.8 k8s.io/apiextensions-apiserver v0.0.0 => k8s.io/apiextensions-apiserver v0.25.8 diff --git a/go.sum b/go.sum index 6aa0f675cf..764feeed8d 100644 --- a/go.sum +++ b/go.sum @@ -91,6 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= +github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= @@ -208,8 +210,6 @@ github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0n github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= -github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 h1:Sg2XxaymeyqqaLG34aB2mvlX+nii916/Gv1ovWc4jMc= -github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= From d9e29d9244dc7d9ca1e5b254c25d5fe8511a4e44 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 08:28:40 -0500 Subject: [PATCH 041/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudwatch from 1.27.7 to 1.27.8 (#3086) chore(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudwatch Bumps [github.com/aws/aws-sdk-go-v2/service/cloudwatch](https://github.com/aws/aws-sdk-go-v2) from 1.27.7 to 1.27.8. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.27.7...service/s3/v1.27.8) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/cloudwatch dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 10 +++++----- go.sum | 16 ++++++++++------ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 8e9b03f62b..546e3c00b1 100644 --- a/go.mod +++ b/go.mod @@ -6,9 +6,9 @@ require ( github.com/antonmedv/expr v1.15.3 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 - github.com/aws/aws-sdk-go-v2 v1.21.0 + github.com/aws/aws-sdk-go-v2 v1.21.1 github.com/aws/aws-sdk-go-v2/config v1.18.43 - github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 + github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible github.com/bombsimon/logrusr/v4 v4.0.0 @@ -84,14 +84,14 @@ require ( github.com/aws/aws-sdk-go v1.44.116 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.13.41 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect - github.com/aws/smithy-go v1.14.2 // indirect + github.com/aws/smithy-go v1.15.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect diff --git a/go.sum b/go.sum index 764feeed8d..5f95f72576 100644 --- a/go.sum +++ b/go.sum @@ -103,22 +103,25 @@ github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2z github.com/aws/aws-sdk-go v1.44.39/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= +github.com/aws/aws-sdk-go-v2 v1.21.1 h1:wjHYshtPpYOZm+/mu3NhVgRRc0baM6LJZOmxPZ5Cwzs= +github.com/aws/aws-sdk-go-v2 v1.21.1/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= github.com/aws/aws-sdk-go-v2/config v1.18.43 h1:IgdUtTRvUDC6eiJBqU6vh7bHFNAEBjQ8S+qJ7zVhDOs= github.com/aws/aws-sdk-go-v2/config v1.18.43/go.mod h1:NiFev8qlgg8MPzw3fO/EwzMZeZwlJEKGwfpjRPA9Nvw= github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9rmEzEhbZFh9JQW/Bg= github.com/aws/aws-sdk-go-v2/credentials v1.13.41/go.mod h1:cc3Fn7DkKbJalPtQnudHGZZ8ml9+hwtbc1CJONsYYqk= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 h1:SijA0mgjV8E+8G45ltVHs0fvKpTj8xmZJ3VwhGKtUSI= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 h1:817VqVe6wvwE46xXy6YF5RywvjOX6U2zRQQ6IbQFK0s= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42/go.mod h1:oDfgXoBBmj+kXnqxDDnIDnC56QBosglKp8ftRCTxR+0= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 h1:7ZApaXzWbo8slc+W5TynuUlB4z66g44h7uqa3/d/BsY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36/go.mod h1:rwr4WnmFi3RJO0M4dxbJtgi9BPLMpVBMX1nUte5ha9U= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 h1:qULF+ElcvjjSEO1+z5x+TmKE9d4yTej7PfpJQPVvexY= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7/go.mod h1:1HKxVrj5wsKy/wb2v07vzTSd+YPV1sDsWxferwPK7PA= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 h1:pdUFDCmsKlwEwVJyq/k3xLBtS/sym3dhBMTCIEDaN40= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8/go.mod h1:EwMPL+Fu95r6yS2UQY99lRR1rDjgCbcPQpy1aQ3fuxE= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= @@ -129,8 +132,9 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaK github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= -github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= +github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= From a1efd967a8f1424fd6966a121a527f74dc2af64a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 08:28:59 -0500 Subject: [PATCH 042/187] chore(deps): bump github.com/aws/aws-sdk-go-v2 from 1.21.0 to 1.21.1 (#3085) Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.21.0 to 1.21.1. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.21.0...v1.21.1) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark From 41b059838ed99dbb40afb88a58e5c3d7cddb4ce2 Mon Sep 17 00:00:00 2001 From: PranitRout07 Date: Wed, 11 Oct 2023 18:59:53 +0530 Subject: [PATCH 043/187] docs: Ensure image not present between incomplete sentence. (#3079) * Update anti-affinity.md * Update mkdocs.yml Signed-off-by: Philip Clark --- docs/features/anti-affinity/anti-affinity.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/features/anti-affinity/anti-affinity.md b/docs/features/anti-affinity/anti-affinity.md index 3c46171d70..2a547c9c07 100644 --- a/docs/features/anti-affinity/anti-affinity.md +++ b/docs/features/anti-affinity/anti-affinity.md @@ -31,6 +31,7 @@ You can learn more about anti-affinity [here](https://kubernetes.io/docs/concept Repeating the above example with anti-affinity enabled, here is what happens when the `.spec.template` of the Rollout changes. Due to anti-affinity, the new pods cannot be scheduled on nodes which run the old ReplicaSet's pods. As a result, the cluster auto-scaler must create 2 nodes to host the new ReplicaSet's pods. In this case, pods won't be started since the scaled-down nodes are guaranteed to not have the new pods. + ![ Original Rollout is running, spread across two nodes](images/solution.png) ## Enabling Anti-Affinity in Rollouts From 0dab695b6e34771b72730639fcdbc62a2574e3ea Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Wed, 11 Oct 2023 14:20:16 -0400 Subject: [PATCH 044/187] cleanup Signed-off-by: Philip Clark --- ui/src/app/components/rollout-actions/rollout-actions.tsx | 3 --- ui/src/app/components/rollout-widget/rollout-widget.scss | 3 --- ui/src/app/components/rollout-widget/rollout-widget.tsx | 1 - ui/src/app/components/rollouts-grid/rollouts-grid.tsx | 4 ---- ui/src/app/components/rollouts-home/rollouts-home.tsx | 5 ++--- 5 files changed, 2 insertions(+), 14 deletions(-) diff --git a/ui/src/app/components/rollout-actions/rollout-actions.tsx b/ui/src/app/components/rollout-actions/rollout-actions.tsx index 2eaad61502..81b5ce1ead 100644 --- a/ui/src/app/components/rollout-actions/rollout-actions.tsx +++ b/ui/src/app/components/rollout-actions/rollout-actions.tsx @@ -25,7 +25,6 @@ interface ActionData { shouldConfirm?: boolean; } -// export const RolloutActionButton = (props: {action: RolloutAction; rollout: RolloutInfo; callback?: Function; indicateLoading: boolean; disabled?: boolean}) => { export const RolloutActionButton = React.memo( ({action, rollout, callback, indicateLoading, disabled}: {action: RolloutAction; rollout: RolloutInfo; callback?: Function; indicateLoading: boolean; disabled?: boolean}) => { const [loading, setLoading] = React.useState(false); @@ -92,8 +91,6 @@ export const RolloutActionButton = React.memo( const ap = actionMap.get(action); - // const [loading, setLoading] = React.useState(false); - return ( void /> {(rollout.strategy || '').toLocaleLowerCase() === 'canary' && }
- {/* {(rollout.replicaSets || []).length < 1 && } */}
{rollout.message !== 'CanaryPauseStep' && rollout.message}
diff --git a/ui/src/app/components/rollouts-grid/rollouts-grid.tsx b/ui/src/app/components/rollouts-grid/rollouts-grid.tsx index 1692d637b6..0784257905 100644 --- a/ui/src/app/components/rollouts-grid/rollouts-grid.tsx +++ b/ui/src/app/components/rollouts-grid/rollouts-grid.tsx @@ -5,10 +5,6 @@ import {RolloutInfo} from '../../../models/rollout/rollout'; import {RolloutWidget} from '../rollout-widget/rollout-widget'; export const RolloutsGrid = ({rollouts}: {rollouts: RolloutInfo[]}) => { - // ({ rollouts, onFavoriteChange, favorites }: { rollouts: RolloutInfo[], onFavoriteChange: (rollout: RolloutInfo) => void, favorites: { [key: string]: boolean } }) => { - // const handleFavoriteChange = (rollout: RolloutInfo) => { - // onFavoriteChange(rollout); - // }; return (
{rollouts.map((rollout, i) => ( diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index 6c1766dc32..cb2fde0a00 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -5,10 +5,9 @@ import {faCircleNotch} from '@fortawesome/free-solid-svg-icons'; import {NamespaceContext} from '../../shared/context/api'; import {useWatchRollouts} from '../../shared/services/rollout'; -import {RolloutsToolbar, defaultDisplayMode} from '../rollouts-toolbar/rollouts-toolbar'; +import {RolloutsToolbar, defaultDisplayMode, Filters} from '../rollouts-toolbar/rollouts-toolbar'; import {RolloutsTable} from '../rollouts-table/rollouts-table'; import {RolloutsGrid} from '../rollouts-grid/rollouts-grid'; -import {Filters} from '../rollouts-toolbar/rollouts-toolbar'; import './rollouts-home.scss'; export const RolloutsHome = () => { @@ -49,7 +48,7 @@ export const RolloutsHome = () => { setFavorites(newFavorites); localStorage.setItem('rolloutsFavorites', JSON.stringify(newFavorites)); }; - + const filteredRollouts = React.useMemo(() => { return rollouts.filter((r) => { if (filters.showFavorites && !favorites[r.objectMeta.name]) { From 159e3a48e0f7886d119e8d4953ebf1990712a31a Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Fri, 13 Oct 2023 09:52:51 -0400 Subject: [PATCH 045/187] reduce complexity of filters Signed-off-by: Philip Clark --- .../rollouts-home/rollouts-home.tsx | 53 ++++++++++--------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index cb2fde0a00..b81bf2d6d4 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -8,6 +8,7 @@ import {useWatchRollouts} from '../../shared/services/rollout'; import {RolloutsToolbar, defaultDisplayMode, Filters} from '../rollouts-toolbar/rollouts-toolbar'; import {RolloutsTable} from '../rollouts-table/rollouts-table'; import {RolloutsGrid} from '../rollouts-grid/rollouts-grid'; +import {RolloutRolloutInfo } from '../../../models/rollout/generated'; import './rollouts-home.scss'; export const RolloutsHome = () => { @@ -49,33 +50,33 @@ export const RolloutsHome = () => { localStorage.setItem('rolloutsFavorites', JSON.stringify(newFavorites)); }; + const isFavorite = (r: RolloutRolloutInfo) => filters.showFavorites && !favorites[r.objectMeta.name]; + + const requiresAttention = (r: RolloutRolloutInfo) => filters.showRequiresAttention && r.status !== 'Degraded' && r.status !== 'Paused' && r.message !== 'CanaryPauseStep'; + + const hasStatusFilter = (r: RolloutRolloutInfo) => Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]; + + const nameMatches = (r: RolloutRolloutInfo) => { + let nameMatches = false; + for (let term of filters.name.split(',').map((t) => t.trim())) { + if (term === '') continue; // Skip empty terms + if (term.startsWith('!')) { + if (!r.objectMeta.name.includes(term.substring(1))) { + nameMatches = true; + break; + } + } else if (r.objectMeta.name.includes(term)) { + nameMatches = true; + break; + } + } + return filters.name === '' || nameMatches; + }; + const filteredRollouts = React.useMemo(() => { - return rollouts.filter((r) => { - if (filters.showFavorites && !favorites[r.objectMeta.name]) { - return false; - } - if (filters.showRequiresAttention && r.status !== 'Degraded' && r.status !== 'Paused' && r.message !== 'CanaryPauseStep') { - return false; - } - if (Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]) { - return false; - } - let nameMatches = false; - for (let term of filters.name.split(',').map((t) => t.trim())) { - if (term === '') continue; // Skip empty terms - if (term.startsWith('!')) { - if (!r.objectMeta.name.includes(term.substring(1))) { - nameMatches = true; - break; - } - } else if (r.objectMeta.name.includes(term)) { - nameMatches = true; - break; - } - } - if (filters.name != '' && !nameMatches) return false; - return true; - }); + return rollouts.filter((r) => { + return isFavorite(r) || requiresAttention(r) || hasStatusFilter(r) || nameMatches(r); + }); }, [rollouts, filters, favorites]); return ( From cc66931ab341584dd4aca70b0d39003e30bbd2e9 Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Fri, 13 Oct 2023 10:51:46 -0400 Subject: [PATCH 046/187] filters logic working Signed-off-by: Philip Clark --- .../rollouts-home/rollouts-home.tsx | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index b81bf2d6d4..4329c6b952 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -50,11 +50,17 @@ export const RolloutsHome = () => { localStorage.setItem('rolloutsFavorites', JSON.stringify(newFavorites)); }; - const isFavorite = (r: RolloutRolloutInfo) => filters.showFavorites && !favorites[r.objectMeta.name]; + const isFavorite = (r: RolloutRolloutInfo) => { + return filters.showFavorites && favorites[r.objectMeta.name]; + } - const requiresAttention = (r: RolloutRolloutInfo) => filters.showRequiresAttention && r.status !== 'Degraded' && r.status !== 'Paused' && r.message !== 'CanaryPauseStep'; + const requiresAttention = (r: RolloutRolloutInfo) => { + return filters.showRequiresAttention && (r.status === 'Degraded' || (r.status === 'Paused' && r.message !== 'CanaryPauseStep')); + } - const hasStatusFilter = (r: RolloutRolloutInfo) => Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]; + const hasStatusFilter = (r: RolloutRolloutInfo) => { + return filters.status[r.status]; + } const nameMatches = (r: RolloutRolloutInfo) => { let nameMatches = false; @@ -74,9 +80,14 @@ export const RolloutsHome = () => { }; const filteredRollouts = React.useMemo(() => { - return rollouts.filter((r) => { - return isFavorite(r) || requiresAttention(r) || hasStatusFilter(r) || nameMatches(r); - }); + return rollouts.filter((r) => { + // Only include the status filter if one of them is enabled + if (Object.values(filters.status).some((v: boolean) => v === true)) { + return isFavorite(r) || requiresAttention(r) || nameMatches(r) || hasStatusFilter(r); + } else { + return isFavorite(r) || requiresAttention(r) || nameMatches(r); + } + }); }, [rollouts, filters, favorites]); return ( From 2abe86c27a1268f96b56127b9021113cb0b6e84e Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Sat, 14 Oct 2023 21:45:50 -0400 Subject: [PATCH 047/187] fix filters Signed-off-by: Philip Clark --- .../rollouts-home/rollouts-home.tsx | 58 ++++++++----------- 1 file changed, 23 insertions(+), 35 deletions(-) diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index 4329c6b952..cb2fde0a00 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -8,7 +8,6 @@ import {useWatchRollouts} from '../../shared/services/rollout'; import {RolloutsToolbar, defaultDisplayMode, Filters} from '../rollouts-toolbar/rollouts-toolbar'; import {RolloutsTable} from '../rollouts-table/rollouts-table'; import {RolloutsGrid} from '../rollouts-grid/rollouts-grid'; -import {RolloutRolloutInfo } from '../../../models/rollout/generated'; import './rollouts-home.scss'; export const RolloutsHome = () => { @@ -50,43 +49,32 @@ export const RolloutsHome = () => { localStorage.setItem('rolloutsFavorites', JSON.stringify(newFavorites)); }; - const isFavorite = (r: RolloutRolloutInfo) => { - return filters.showFavorites && favorites[r.objectMeta.name]; - } - - const requiresAttention = (r: RolloutRolloutInfo) => { - return filters.showRequiresAttention && (r.status === 'Degraded' || (r.status === 'Paused' && r.message !== 'CanaryPauseStep')); - } - - const hasStatusFilter = (r: RolloutRolloutInfo) => { - return filters.status[r.status]; - } - - const nameMatches = (r: RolloutRolloutInfo) => { - let nameMatches = false; - for (let term of filters.name.split(',').map((t) => t.trim())) { - if (term === '') continue; // Skip empty terms - if (term.startsWith('!')) { - if (!r.objectMeta.name.includes(term.substring(1))) { - nameMatches = true; - break; - } - } else if (r.objectMeta.name.includes(term)) { - nameMatches = true; - break; - } - } - return filters.name === '' || nameMatches; - }; - const filteredRollouts = React.useMemo(() => { return rollouts.filter((r) => { - // Only include the status filter if one of them is enabled - if (Object.values(filters.status).some((v: boolean) => v === true)) { - return isFavorite(r) || requiresAttention(r) || nameMatches(r) || hasStatusFilter(r); - } else { - return isFavorite(r) || requiresAttention(r) || nameMatches(r); + if (filters.showFavorites && !favorites[r.objectMeta.name]) { + return false; + } + if (filters.showRequiresAttention && r.status !== 'Degraded' && r.status !== 'Paused' && r.message !== 'CanaryPauseStep') { + return false; + } + if (Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]) { + return false; + } + let nameMatches = false; + for (let term of filters.name.split(',').map((t) => t.trim())) { + if (term === '') continue; // Skip empty terms + if (term.startsWith('!')) { + if (!r.objectMeta.name.includes(term.substring(1))) { + nameMatches = true; + break; + } + } else if (r.objectMeta.name.includes(term)) { + nameMatches = true; + break; + } } + if (filters.name != '' && !nameMatches) return false; + return true; }); }, [rollouts, filters, favorites]); From c3b8014bb26f11b7186445c3f881bc2f2ecf9cd5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 31 Aug 2023 22:21:17 -0500 Subject: [PATCH 048/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.37 to 1.18.38 (#3002) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.37 to 1.18.38. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.37...config/v1.18.38) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index e0c698e349..194ea42f40 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.37 + github.com/aws/aws-sdk-go-v2/config v1.18.38 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3 github.com/blang/semver v3.5.1+incompatible @@ -82,13 +82,13 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.35 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.36 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.13.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 // indirect github.com/aws/smithy-go v1.14.2 // indirect diff --git a/go.sum b/go.sum index 7141284a58..391f548a45 100644 --- a/go.sum +++ b/go.sum @@ -105,10 +105,10 @@ github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WN github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.37 h1:RNAfbPqw1CstCooHaTPhScz7z1PyocQj0UL+l95CgzI= -github.com/aws/aws-sdk-go-v2/config v1.18.37/go.mod h1:8AnEFxW9/XGKCbjYDCJy7iltVNyEI9Iu9qC21UzhhgQ= -github.com/aws/aws-sdk-go-v2/credentials v1.13.35 h1:QpsNitYJu0GgvMBLUIYu9H4yryA5kMksjeIVQfgXrt8= -github.com/aws/aws-sdk-go-v2/credentials v1.13.35/go.mod h1:o7rCaLtvK0hUggAGclf76mNGGkaG5a9KWlp+d9IpcV8= +github.com/aws/aws-sdk-go-v2/config v1.18.38 h1:CByQCELMgm2tM1lAehx3XNg0R/pfeXsYzqn0Aq2chJQ= +github.com/aws/aws-sdk-go-v2/config v1.18.38/go.mod h1:vNm9Hf5VgG2fSUWhT3zFrqN/RosGcabFMYgiSoxKFU8= +github.com/aws/aws-sdk-go-v2/credentials v1.13.36 h1:ps0cPswZjpsOk6sLwG6fdXTzrYjCplgPEyG3OUbbdqE= +github.com/aws/aws-sdk-go-v2/credentials v1.13.36/go.mod h1:sY2phUzxbygoyDtTXhqi7GjGjCQ1S5a5Rj8u3ksBxCg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= @@ -123,8 +123,8 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3 h1:CAWMcMnRY github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.13.5 h1:oCvTFSDi67AX0pOX3PuPdGFewvLRU2zzFSrTsgURNo0= -github.com/aws/aws-sdk-go-v2/service/sso v1.13.5/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 h1:2PylFCfKCEDv6PeSN09pC/VUiRd10wi1VfHG5FrW0/g= +github.com/aws/aws-sdk-go-v2/service/sso v1.13.6/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5 h1:dnInJb4S0oy8aQuri1mV6ipLlnZPfnsDNB9BGO9PDNY= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 h1:CQBFElb0LS8RojMJlxRSo/HXipvTZW2S44Lt9Mk2aYQ= From c5aa2bca0c8f407b7f26c4f840d51d3731e7a7b3 Mon Sep 17 00:00:00 2001 From: Daniel Wright Date: Sun, 3 Sep 2023 11:50:18 +1000 Subject: [PATCH 049/187] docs: update all ingress objects to networking.k8s.io/v1 (#3005) This commit updates all Kubernetes ingress rules in Argo Rollouts to use the stable `networking.k8s.io/v1` API, ensuring compatibility with Kubernetes v1.19+ and leveraging new features available in the stable version. Signed-off-by: Daniel Wright Signed-off-by: Philip Clark --- docs/best-practices.md | 37 ++++++++++++------- docs/features/traffic-management/alb.md | 36 ++++++++++-------- docs/getting-started/alb/index.md | 33 +++++++++-------- docs/getting-started/alb/ingress.yaml | 11 ++++-- docs/getting-started/mixed/index.md | 19 ++++++---- docs/getting-started/mixed/ingress.yaml | 11 ++++-- docs/getting-started/nginx/index.md | 13 ++++--- docs/getting-started/nginx/ingress.yaml | 11 ++++-- docs/getting-started/smi/ingress.yaml | 11 ++++-- .../testdata/invalid-ingress-smi-multi.yml | 18 ++++++--- .../lint/testdata/invalid-nginx-canary.yml | 11 ++++-- .../cmd/lint/testdata/valid-alb-canary.yml | 11 ++++-- .../lint/testdata/valid-ingress-smi-multi.yml | 18 ++++++--- .../cmd/lint/testdata/valid-ingress-smi.yml | 20 ++++++---- .../testdata/valid-nginx-basic-canary.yml | 11 ++++-- .../cmd/lint/testdata/valid-nginx-canary.yml | 11 ++++-- 16 files changed, 175 insertions(+), 107 deletions(-) diff --git a/docs/best-practices.md b/docs/best-practices.md index ffbb4ff411..735478aa5b 100644 --- a/docs/best-practices.md +++ b/docs/best-practices.md @@ -19,7 +19,7 @@ to the ingress rules so that it is possible to specifically reach to the desired pods or stable pods. ```yaml -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: guestbook @@ -29,25 +29,36 @@ spec: - host: guestbook-desired.argoproj.io http: paths: - - backend: - serviceName: guestbook-desired - servicePort: 443 - path: /* + - path: / + pathType: Prefix + backend: + service: + name: guestbook-desired + port: + number: 443 + # host rule to only reach the stable pods - host: guestbook-stable.argoproj.io http: paths: - - backend: - serviceName: guestbook-stable - servicePort: 443 - path: /* + - path: / + pathType: Prefix + backend: + service: + name: guestbook-stable + port: + number: 443 + # default rule which omits host, and will split traffic between desired vs. stable - http: paths: - - backend: - serviceName: guestbook-root - servicePort: 443 - path: /* + - path: / + pathType: Prefix + backend: + service: + name: guestbook-root + port: + number: 443 ``` The above technique has the a benefit in that it would not incur additional cost of allocating diff --git a/docs/features/traffic-management/alb.md b/docs/features/traffic-management/alb.md index 0ac0ff6173..5b4c424528 100644 --- a/docs/features/traffic-management/alb.md +++ b/docs/features/traffic-management/alb.md @@ -53,7 +53,7 @@ spec: ingress: ingress # If you want to controll multiple ingress resources you can use the ingresses field, if ingresses is specified # the ingress field will need to be omitted. - ingresses: + ingresses: - ingress-1 - ingress-2 # Reference to a Service that the Ingress must target in one of the rules (optional). @@ -66,7 +66,7 @@ spec: The referenced Ingress should be deployed with an ingress rule that matches the Rollout service: ```yaml -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ingress @@ -76,14 +76,17 @@ spec: rules: - http: paths: - - path: /* + - path: / + pathType: Prefix backend: - # serviceName must match either: canary.trafficRouting.alb.rootService (if specified), - # or canary.stableService (if rootService is omitted) - serviceName: root-service - # servicePort must be the value: use-annotation - # This instructs AWS Load Balancer Controller to look to annotations on how to direct traffic - servicePort: use-annotation + service: + # serviceName must match either: canary.trafficRouting.alb.rootService (if specified), + # or canary.stableService (if rootService is omitted) + name: root-service + # servicePort must be the value: use-annotation + # This instructs AWS Load Balancer Controller to look to annotations on how to direct traffic + port: + name: use-annotation ``` During an update, the rollout controller injects the `alb.ingress.kubernetes.io/actions.` @@ -95,7 +98,7 @@ annotation that splits traffic between the canary-service and stable-service, wi of 10 and 90 respectively: ```yaml -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ingress @@ -123,10 +126,13 @@ spec: rules: - http: paths: - - path: /* + - path: / + pathType: Prefix backend: - serviceName: root-service - servicePort: use-annotation + service: + name: root-service + port: + name: use-annotation ``` !!! note @@ -411,7 +417,7 @@ spec: By default, Argo Rollout will operate on Ingresses with the annotation: ```yaml -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: annotations: @@ -420,7 +426,7 @@ metadata: Or with the `ingressClassName`: ```yaml -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress spec: ingressClassName: alb diff --git a/docs/getting-started/alb/index.md b/docs/getting-started/alb/index.md index a158b64748..73b3856c9e 100644 --- a/docs/getting-started/alb/index.md +++ b/docs/getting-started/alb/index.md @@ -1,7 +1,7 @@ # Getting Started - AWS Load Balancer Controller This guide covers how Argo Rollouts integrates with the -[AWS Load Balancer Controller](https://kubernetes-sigs.github.io/aws-load-balancer-controller/latest/) +[AWS Load Balancer Controller](https://kubernetes-sigs.github.io/aws-load-balancer-controller/latest/) for traffic shaping. This guide builds upon the concepts of the [basic getting started guide](../../getting-started.md). ## Requirements @@ -48,7 +48,7 @@ This should be `canary.trafficRouting.alb.rootService` (if specified), otherwise use `canary.stableService`. ```yaml -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: rollouts-demo-ingress @@ -58,20 +58,23 @@ spec: rules: - http: paths: - - path: /* + - path: / + pathType: Prefix backend: - # serviceName must match either: canary.trafficRouting.alb.rootService (if specified), - # or canary.stableService (if rootService is omitted) - serviceName: rollouts-demo-root - # servicePort must be the value: use-annotation - # This instructs AWS Load Balancer Controller to look to annotations on how to direct traffic - servicePort: use-annotation + service: + # serviceName must match either: canary.trafficRouting.alb.rootService (if specified), + # or canary.stableService (if rootService is omitted) + name: rollouts-demo-root + # servicePort must be the value: use-annotation + # This instructs AWS Load Balancer Controller to look to annotations on how to direct traffic + port: + name: use-annotation ``` During an update, the Ingress will be injected with a [custom action annotation](https://kubernetes-sigs.github.io/aws-load-balancer-controller/latest/guide/ingress/annotations/#actions), which directs the ALB to splits traffic between the stable and canary Services referenced by the Rollout. -In this example, those Services are named: `rollouts-demo-stable` and `rollouts-demo-canary` +In this example, those Services are named: `rollouts-demo-stable` and `rollouts-demo-canary` respectively. Run the following commands to deploy: @@ -123,15 +126,15 @@ kubectl argo rollouts get rollout rollouts-demo ![Rollout ALB Paused](paused-rollout-alb.png) At this point, both the canary and stable version of the Rollout are running, with 5% of the -traffic directed to the canary. To understand how this works, inspect the listener rules for -the ALB. When looking at the listener rules, we see that the forward action weights +traffic directed to the canary. To understand how this works, inspect the listener rules for +the ALB. When looking at the listener rules, we see that the forward action weights have been modified by the controller to reflect the current weight of the canary. ![ALB Listener_Rules](alb-listener-rules.png) -The controller has added `rollouts-pod-template-hash` selector to the Services and -attached the same label to the Pods. Therefore, you can split the traffic by simply +The controller has added `rollouts-pod-template-hash` selector to the Services and +attached the same label to the Pods. Therefore, you can split the traffic by simply forwarding the requests to the Services according to the weights. - + As the Rollout progresses through steps, the forward action weights will be adjusted to match the current setWeight of the steps. diff --git a/docs/getting-started/alb/ingress.yaml b/docs/getting-started/alb/ingress.yaml index 1f1b66ca7d..a90c59c417 100644 --- a/docs/getting-started/alb/ingress.yaml +++ b/docs/getting-started/alb/ingress.yaml @@ -1,4 +1,4 @@ -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: rollouts-demo-ingress @@ -8,7 +8,10 @@ spec: rules: - http: paths: - - path: /* + - path: / + pathType: Prefix backend: - serviceName: rollouts-demo-root - servicePort: use-annotation + service: + name: rollouts-demo-root + port: + name: use-annotation diff --git a/docs/getting-started/mixed/index.md b/docs/getting-started/mixed/index.md index 4a6d12f02b..5c59f37098 100644 --- a/docs/getting-started/mixed/index.md +++ b/docs/getting-started/mixed/index.md @@ -4,11 +4,11 @@ Available since v1.2 This guide covers how Argo Rollouts integrates with multiple TrafficRoutings, using -[Linkerd](https://linkerd.io) and +[Linkerd](https://linkerd.io) and [NGINX Ingress Controller](https://github.com/kubernetes/ingress-nginx) for traffic shaping, but you should be able to produce any other combination between the existing trafficRouting options. -This guide builds upon the concepts of the [basic getting started guide](../../getting-started.md), +This guide builds upon the concepts of the [basic getting started guide](../../getting-started.md), [NGINX Guide](getting-started/nginx/index.md), and [SMI Guide](getting-started/smi/index.md). ## Requirements @@ -89,7 +89,7 @@ rule which has a backend targeting the Service referenced under `canary.stableSe In our example, that stable Service is named: `rollouts-demo-stable`: ```yaml -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: rollouts-demo-stable @@ -101,10 +101,13 @@ spec: http: paths: - path: / + pathType: Prefix backend: - # Reference to a Service name, also specified in the Rollout spec.strategy.canary.stableService field - serviceName: rollouts-demo-stable - servicePort: 80 + service: + # Reference to a Service name, also specified in the Rollout spec.strategy.canary.stableService field + name: rollouts-demo-stable + port: + number: 80 ``` Run the following commands to deploy: @@ -183,8 +186,8 @@ kubectl argo rollouts get rollout rollouts-demo ![Rollout Paused](../nginx/paused-rollout-nginx.png) At this point, both the canary and stable version of the Rollout are running, with 5% of the -traffic directed to the canary and 95% to the stable. When inspecting the TrafficSplit generated by -the controller, we see that the weight has been updated to reflect the current `setWeight: 5` step of +traffic directed to the canary and 95% to the stable. When inspecting the TrafficSplit generated by +the controller, we see that the weight has been updated to reflect the current `setWeight: 5` step of the canary deploy. ```yaml diff --git a/docs/getting-started/mixed/ingress.yaml b/docs/getting-started/mixed/ingress.yaml index 1020c7bb64..25ee1a2ed7 100644 --- a/docs/getting-started/mixed/ingress.yaml +++ b/docs/getting-started/mixed/ingress.yaml @@ -1,4 +1,4 @@ -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: rollouts-demo-stable @@ -10,7 +10,10 @@ spec: http: paths: - path: / + pathType: Prefix backend: - # Reference to a Service name, also specified in the Rollout spec.strategy.canary.stableService field - serviceName: rollouts-demo-stable - servicePort: 80 + service: + # Reference to a Service name, also specified in the Rollout spec.strategy.canary.stableService field + name: rollouts-demo-stable + port: + number: 80 diff --git a/docs/getting-started/nginx/index.md b/docs/getting-started/nginx/index.md index aaa89302db..5875ee62bb 100644 --- a/docs/getting-started/nginx/index.md +++ b/docs/getting-started/nginx/index.md @@ -1,7 +1,7 @@ # Getting Started - NGINX Ingress This guide covers how Argo Rollouts integrates with the -[NGINX Ingress Controller](https://github.com/kubernetes/ingress-nginx) for traffic shaping. +[NGINX Ingress Controller](https://github.com/kubernetes/ingress-nginx) for traffic shaping. This guide builds upon the concepts of the [basic getting started guide](../../getting-started.md). ## Requirements @@ -41,7 +41,7 @@ rule which has a backend targeting the Service referenced under `canary.stableSe In our example, that stable Service is named: `rollouts-demo-stable`: ```yaml -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: rollouts-demo-stable @@ -53,10 +53,13 @@ spec: http: paths: - path: / + pathType: Prefix backend: - # Reference to a Service name, also specified in the Rollout spec.strategy.canary.stableService field - serviceName: rollouts-demo-stable - servicePort: 80 + service: + # Reference to a Service name, also specified in the Rollout spec.strategy.canary.stableService field + name: rollouts-demo-stable + port: + number: 80 ``` Run the following commands to deploy: diff --git a/docs/getting-started/nginx/ingress.yaml b/docs/getting-started/nginx/ingress.yaml index 1020c7bb64..25ee1a2ed7 100644 --- a/docs/getting-started/nginx/ingress.yaml +++ b/docs/getting-started/nginx/ingress.yaml @@ -1,4 +1,4 @@ -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: rollouts-demo-stable @@ -10,7 +10,10 @@ spec: http: paths: - path: / + pathType: Prefix backend: - # Reference to a Service name, also specified in the Rollout spec.strategy.canary.stableService field - serviceName: rollouts-demo-stable - servicePort: 80 + service: + # Reference to a Service name, also specified in the Rollout spec.strategy.canary.stableService field + name: rollouts-demo-stable + port: + number: 80 diff --git a/docs/getting-started/smi/ingress.yaml b/docs/getting-started/smi/ingress.yaml index 52bbea5701..9a1eddb957 100644 --- a/docs/getting-started/smi/ingress.yaml +++ b/docs/getting-started/smi/ingress.yaml @@ -1,4 +1,4 @@ -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: rollouts-demo-stable @@ -16,7 +16,10 @@ spec: http: paths: - path: / + pathType: Prefix backend: - # Reference to a Service name, also specified in the Rollout spec.strategy.canary.stableService field - serviceName: rollouts-demo-stable - servicePort: 80 + service: + # Reference to a Service name, also specified in the Rollout spec.strategy.canary.stableService field + name: rollouts-demo-stable + port: + number: 80 diff --git a/pkg/kubectl-argo-rollouts/cmd/lint/testdata/invalid-ingress-smi-multi.yml b/pkg/kubectl-argo-rollouts/cmd/lint/testdata/invalid-ingress-smi-multi.yml index fc04b8deb7..edabcc33f2 100644 --- a/pkg/kubectl-argo-rollouts/cmd/lint/testdata/invalid-ingress-smi-multi.yml +++ b/pkg/kubectl-argo-rollouts/cmd/lint/testdata/invalid-ingress-smi-multi.yml @@ -49,7 +49,7 @@ spec: - service: rollout-smi-experiment-canary weight: 5 --- -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: rollout-smi-experiment-stable @@ -61,16 +61,22 @@ spec: http: paths: - path: / + pathType: Prefix backend: - serviceName: rollout-smi-experiment-stable - servicePort: 80 + service: + name: rollout-smi-experiment-stable + port: + number: 80 - host: rollout-smi-experiment-root.local http: paths: - path: / + pathType: Prefix backend: - serviceName: rollout-smi-experiment-root - servicePort: 80 + service: + name: rollout-smi-experiment-root + port: + number: 80 --- apiVersion: argoproj.io/v1alpha1 kind: Rollout @@ -241,4 +247,4 @@ spec: resources: requests: memory: 16Mi - cpu: 5m \ No newline at end of file + cpu: 5m diff --git a/pkg/kubectl-argo-rollouts/cmd/lint/testdata/invalid-nginx-canary.yml b/pkg/kubectl-argo-rollouts/cmd/lint/testdata/invalid-nginx-canary.yml index ec90d8ad2d..21d6fd2a6d 100644 --- a/pkg/kubectl-argo-rollouts/cmd/lint/testdata/invalid-nginx-canary.yml +++ b/pkg/kubectl-argo-rollouts/cmd/lint/testdata/invalid-nginx-canary.yml @@ -40,7 +40,7 @@ spec: selector: app: nginx-rollout --- -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: nginx-rollout-ingress @@ -50,10 +50,13 @@ spec: rules: - http: paths: - - path: /* + - path: / + pathType: Prefix backend: - serviceName: nginx-rollout-root - servicePort: use-annotation + service: + name: nginx-rollout-root + port: + name: use-annotation --- apiVersion: argoproj.io/v1alpha1 kind: Rollout diff --git a/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-alb-canary.yml b/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-alb-canary.yml index c0b2131c74..8879442ca4 100644 --- a/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-alb-canary.yml +++ b/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-alb-canary.yml @@ -40,7 +40,7 @@ spec: selector: app: alb-rollout --- -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: alb-rollout-ingress @@ -48,10 +48,13 @@ spec: rules: - http: paths: - - path: /* + - path: / + pathType: Prefix backend: - serviceName: alb-rollout-root - servicePort: use-annotation + service: + name: alb-rollout-root + port: + name: use-annotation --- apiVersion: argoproj.io/v1alpha1 kind: Rollout diff --git a/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-ingress-smi-multi.yml b/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-ingress-smi-multi.yml index 884eebf406..b28afb5579 100644 --- a/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-ingress-smi-multi.yml +++ b/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-ingress-smi-multi.yml @@ -49,7 +49,7 @@ spec: - service: rollout-smi-experiment-canary weight: 5 --- -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: rollout-smi-experiment-stable @@ -61,16 +61,22 @@ spec: http: paths: - path: / + pathType: Prefix backend: - serviceName: rollout-smi-experiment-stable - servicePort: 80 + service: + name: rollout-smi-experiment-stable + port: + number: 80 - host: rollout-smi-experiment-root.local http: paths: - path: / + pathType: Prefix backend: - serviceName: rollout-smi-experiment-root - servicePort: 80 + service: + name: rollout-smi-experiment-root + port: + number: 80 --- apiVersion: argoproj.io/v1alpha1 kind: Rollout @@ -241,4 +247,4 @@ spec: resources: requests: memory: 16Mi - cpu: 5m \ No newline at end of file + cpu: 5m diff --git a/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-ingress-smi.yml b/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-ingress-smi.yml index 63f9e6cddf..cd398732ea 100644 --- a/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-ingress-smi.yml +++ b/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-ingress-smi.yml @@ -49,7 +49,7 @@ spec: - service: rollout-smi-experiment-canary weight: 5 --- -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: rollout-smi-experiment-stable @@ -61,16 +61,22 @@ spec: http: paths: - path: / + pathType: Prefix backend: - serviceName: rollout-smi-experiment-stable - servicePort: 80 + service: + name: rollout-smi-experiment-stable + port: + number: 80 - host: rollout-smi-experiment-root.local http: paths: - - path: / - backend: - serviceName: rollout-smi-experiment-root - servicePort: 80 + - path: / + pathType: Prefix + backend: + service: + name: rollout-smi-experiment-root + port: + number: 80 --- apiVersion: argoproj.io/v1alpha1 kind: Rollout diff --git a/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-nginx-basic-canary.yml b/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-nginx-basic-canary.yml index 4d295c6c86..f0e08e83e1 100644 --- a/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-nginx-basic-canary.yml +++ b/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-nginx-basic-canary.yml @@ -12,7 +12,7 @@ spec: selector: app: nginx-rollout --- -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: nginx-rollout-ingress @@ -20,10 +20,13 @@ spec: rules: - http: paths: - - path: /* + - path: / + pathType: Prefix backend: - serviceName: nginx-rollout-root - servicePort: use-annotation + service: + name: nginx-rollout-root + port: + name: use-annotation --- apiVersion: argoproj.io/v1alpha1 kind: Rollout diff --git a/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-nginx-canary.yml b/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-nginx-canary.yml index 30fe00ca12..f492d74617 100644 --- a/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-nginx-canary.yml +++ b/pkg/kubectl-argo-rollouts/cmd/lint/testdata/valid-nginx-canary.yml @@ -40,7 +40,7 @@ spec: selector: app: nginx-rollout --- -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: nginx-rollout-ingress @@ -48,10 +48,13 @@ spec: rules: - http: paths: - - path: /* + - path: / + pathType: Prefix backend: - serviceName: nginx-rollout-root - servicePort: use-annotation + service: + name: nginx-rollout-root + port: + name: use-annotation --- apiVersion: argoproj.io/v1alpha1 kind: Rollout From 3dbe18ba416b60ec3810f80c56c3188c1b8bf544 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Sep 2023 22:37:30 -0500 Subject: [PATCH 050/187] chore(deps): bump sigstore/cosign-installer from 3.1.1 to 3.1.2 (#3011) Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.1.1 to 3.1.2. - [Release notes](https://github.com/sigstore/cosign-installer/releases) - [Commits](https://github.com/sigstore/cosign-installer/compare/v3.1.1...11086d25041f77fe8fe7b9ea4e48e3b9192b8f19) --- updated-dependencies: - dependency-name: sigstore/cosign-installer dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/image-reuse.yaml | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index 2385b035a6..41b749a33d 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -74,7 +74,7 @@ jobs: go-version: ${{ inputs.go-version }} - name: Install cosign - uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # v3.1.1 + uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # v3.1.2 with: cosign-release: 'v2.0.2' diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bb4d221fc5..2eb8fce786 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -170,7 +170,7 @@ jobs: go-version: ${{ env.GOLANG_VERSION }} - name: Install cosign - uses: sigstore/cosign-installer@204a51a57a74d190b284a0ce69b44bc37201f343 # v3.0.3 + uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # v3.0.3 with: cosign-release: 'v2.0.2' From 1df4d0b8fbb616dc2a9e8ceccf31a6379dfae7e5 Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Sat, 7 Oct 2023 09:29:19 -0400 Subject: [PATCH 051/187] ui refresh for rollouts list view Signed-off-by: Philip Clark --- docs/CONTRIBUTING.md | 16 ++ ui/package.json | 1 + ui/src/app/App.tsx | 4 +- .../confirm-button/confirm-button.tsx | 8 +- ui/src/app/components/info-item/info-item.tsx | 2 +- ui/src/app/components/pods/pods.tsx | 5 +- .../rollout-actions/rollout-actions.tsx | 169 ++++++------ .../rollout-widget/rollout-widget.scss | 181 ++++++++++++ .../rollout-widget/rollout-widget.tsx | 107 ++++++++ ui/src/app/components/rollout/containers.tsx | 3 +- ui/src/app/components/rollout/rollout.tsx | 7 +- .../rollouts-grid/rollouts-grid.scss | 8 + .../rollouts-grid/rollouts-grid.tsx | 19 ++ .../rollouts-home.scss} | 6 + .../rollouts-home/rollouts-home.tsx | 128 +++++++++ .../rollouts-list/rollouts-list.tsx | 258 ------------------ .../rollouts-table/rollouts-table.scss | 14 + .../rollouts-table/rollouts-table.tsx | 223 +++++++++++++++ .../rollouts-toolbar/rollouts-toolbar.scss | 43 +++ .../rollouts-toolbar/rollouts-toolbar.tsx | 198 ++++++++++++++ .../components/status-count/status-count.scss | 31 +++ .../components/status-count/status-count.tsx | 16 ++ .../components/status-icon/status-icon.tsx | 34 ++- ui/src/app/index.tsx | 2 +- ui/src/models/rollout/analysisrun.tsx | 4 + 25 files changed, 1124 insertions(+), 363 deletions(-) create mode 100644 ui/src/app/components/rollout-widget/rollout-widget.scss create mode 100644 ui/src/app/components/rollout-widget/rollout-widget.tsx create mode 100644 ui/src/app/components/rollouts-grid/rollouts-grid.scss create mode 100644 ui/src/app/components/rollouts-grid/rollouts-grid.tsx rename ui/src/app/components/{rollouts-list/rollouts-list.scss => rollouts-home/rollouts-home.scss} (97%) create mode 100644 ui/src/app/components/rollouts-home/rollouts-home.tsx delete mode 100644 ui/src/app/components/rollouts-list/rollouts-list.tsx create mode 100644 ui/src/app/components/rollouts-table/rollouts-table.scss create mode 100644 ui/src/app/components/rollouts-table/rollouts-table.tsx create mode 100644 ui/src/app/components/rollouts-toolbar/rollouts-toolbar.scss create mode 100644 ui/src/app/components/rollouts-toolbar/rollouts-toolbar.tsx create mode 100644 ui/src/app/components/status-count/status-count.scss create mode 100644 ui/src/app/components/status-count/status-count.tsx create mode 100644 ui/src/models/rollout/analysisrun.tsx diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index a37ad29fc0..d1ce358e63 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -110,6 +110,22 @@ To run a subset of e2e tests, you need to specify the suite with `-run`, and the E2E_TEST_OPTIONS="-run 'TestCanarySuite' -testify.m 'TestCanaryScaleDownOnAbortNoTrafficRouting'" make test-e2e ``` +## Running the UI + +If you'd like to run the UI locally, you first need a running Rollouts controller. This can be a locally running controller with a k3d cluster, as described above, or a controller running in a remote Kubernetes cluster. + +In order for the local React app to communicate with the controller and Kubernetes API, run the following to open a port forward to the dashboard: +```bash +kubectl argo rollouts dashboard +``` + +In another terminal, run the following to start the UI: +```bash +cd ui +yarn install +yarn start +``` + ## Controller architecture Argo Rollouts is actually a collection of individual controllers diff --git a/ui/package.json b/ui/package.json index fac0a758f3..46c0e34666 100644 --- a/ui/package.json +++ b/ui/package.json @@ -4,6 +4,7 @@ "private": true, "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.4.0", + "@fortawesome/free-regular-svg-icons": "^6.4.0", "@fortawesome/free-solid-svg-icons": "^6.4.0", "@fortawesome/react-fontawesome": "^0.2.0", "antd": "^5.4.2", diff --git a/ui/src/app/App.tsx b/ui/src/app/App.tsx index 60ba5419c6..ae0bd2b54e 100644 --- a/ui/src/app/App.tsx +++ b/ui/src/app/App.tsx @@ -7,7 +7,7 @@ import './App.scss'; import {NamespaceContext, RolloutAPI} from './shared/context/api'; import {Modal} from './components/modal/modal'; import {Rollout} from './components/rollout/rollout'; -import {RolloutsList} from './components/rollouts-list/rollouts-list'; +import {RolloutsHome} from './components/rollouts-home/rollouts-home'; import {Shortcut, Shortcuts} from './components/shortcuts/shortcuts'; import {ConfigProvider} from 'antd'; import {theme} from '../config/theme'; @@ -84,7 +84,7 @@ const App = () => { } + component={} shortcuts={[ {key: '/', description: 'Search'}, {key: 'TAB', description: 'Search, navigate search items'}, diff --git a/ui/src/app/components/confirm-button/confirm-button.tsx b/ui/src/app/components/confirm-button/confirm-button.tsx index 4dd4f37e7c..48ce3fba77 100644 --- a/ui/src/app/components/confirm-button/confirm-button.tsx +++ b/ui/src/app/components/confirm-button/confirm-button.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import {Button, Popconfirm, Tooltip} from 'antd'; import {ButtonProps} from 'antd/es/button/button'; import {useState} from 'react'; -import { TooltipPlacement } from 'antd/es/tooltip'; +import {TooltipPlacement} from 'antd/es/tooltip'; interface ConfirmButtonProps extends ButtonProps { skipconfirm?: boolean; @@ -51,7 +51,8 @@ export const ConfirmButton = (props: ConfirmButtonProps) => { onClick={(e) => { e.stopPropagation(); e.preventDefault(); - }}> + }} + > { okText='Yes' cancelText='No' onOpenChange={handleOpenChange} - placement={props.placement || 'bottom'}> + placement={props.placement || 'bottom'} + >
diff --git a/ui/src/app/components/info-item/info-item.tsx b/ui/src/app/components/info-item/info-item.tsx index 7e7bf8e617..ab64712885 100644 --- a/ui/src/app/components/info-item/info-item.tsx +++ b/ui/src/app/components/info-item/info-item.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import './info-item.scss'; -import { Tooltip } from 'antd'; +import {Tooltip} from 'antd'; export enum InfoItemKind { Default = 'default', diff --git a/ui/src/app/components/pods/pods.tsx b/ui/src/app/components/pods/pods.tsx index c3e5fecb32..1107a8444d 100644 --- a/ui/src/app/components/pods/pods.tsx +++ b/ui/src/app/components/pods/pods.tsx @@ -55,7 +55,7 @@ export const ReplicaSets = (props: {replicaSets: RolloutReplicaSetInfo[]; showRe
- ) + ), )}
); @@ -84,7 +84,8 @@ export const ReplicaSet = (props: {rs: RolloutReplicaSetInfo; showRevision?: boo Scaledown in - }> + } + > ) as any} icon='fa fa-clock'> ); diff --git a/ui/src/app/components/rollout-actions/rollout-actions.tsx b/ui/src/app/components/rollout-actions/rollout-actions.tsx index 94a4b289f2..2eaad61502 100644 --- a/ui/src/app/components/rollout-actions/rollout-actions.tsx +++ b/ui/src/app/components/rollout-actions/rollout-actions.tsx @@ -25,93 +25,98 @@ interface ActionData { shouldConfirm?: boolean; } -export const RolloutActionButton = (props: {action: RolloutAction; rollout: RolloutInfo; callback?: Function; indicateLoading: boolean; disabled?: boolean}) => { - const api = React.useContext(RolloutAPIContext); - const namespaceCtx = React.useContext(NamespaceContext); +// export const RolloutActionButton = (props: {action: RolloutAction; rollout: RolloutInfo; callback?: Function; indicateLoading: boolean; disabled?: boolean}) => { +export const RolloutActionButton = React.memo( + ({action, rollout, callback, indicateLoading, disabled}: {action: RolloutAction; rollout: RolloutInfo; callback?: Function; indicateLoading: boolean; disabled?: boolean}) => { + const [loading, setLoading] = React.useState(false); + const api = React.useContext(RolloutAPIContext); + const namespaceCtx = React.useContext(NamespaceContext); - const restartedAt = formatTimestamp(props.rollout.restartedAt || ''); - const isDeploying = props.rollout.status === RolloutStatus.Progressing || props.rollout.status === RolloutStatus.Paused; + const restartedAt = formatTimestamp(rollout.restartedAt || ''); + const isDeploying = rollout.status === RolloutStatus.Progressing || rollout.status === RolloutStatus.Paused; - const actionMap = new Map([ - [ - RolloutAction.Restart, - { - label: 'RESTART', - icon: faSync, - action: api.rolloutServiceRestartRollout, - tooltip: restartedAt === 'Never' ? 'Never restarted' : `Last restarted ${restartedAt}`, - shouldConfirm: true, - }, - ], - [ - RolloutAction.Retry, - { - label: 'RETRY', - icon: faRedoAlt, - action: api.rolloutServiceRetryRollout, - disabled: props.rollout.status !== RolloutStatus.Degraded, - shouldConfirm: true, - }, - ], - [ - RolloutAction.Abort, - { - label: 'ABORT', - icon: faExclamationCircle, - action: api.rolloutServiceAbortRollout, - disabled: !isDeploying, - shouldConfirm: true, - }, - ], - [ - RolloutAction.Promote, - { - label: 'PROMOTE', - icon: faChevronCircleUp, - action: api.rolloutServicePromoteRollout, - body: {full: false}, - disabled: !isDeploying, - shouldConfirm: true, - }, - ], - [ - RolloutAction.PromoteFull, - { - label: 'PROMOTE-FULL', - icon: faArrowCircleUp, - action: api.rolloutServicePromoteRollout, - body: {full: true}, - disabled: !isDeploying, - shouldConfirm: true, - }, - ], - ]); + const actionMap = new Map([ + [ + RolloutAction.Restart, + { + label: 'RESTART', + icon: faSync, + action: api.rolloutServiceRestartRollout, + tooltip: restartedAt === 'Never' ? 'Never restarted' : `Last restarted ${restartedAt}`, + shouldConfirm: true, + }, + ], + [ + RolloutAction.Retry, + { + label: 'RETRY', + icon: faRedoAlt, + action: api.rolloutServiceRetryRollout, + disabled: rollout.status !== RolloutStatus.Degraded, + shouldConfirm: true, + }, + ], + [ + RolloutAction.Abort, + { + label: 'ABORT', + icon: faExclamationCircle, + action: api.rolloutServiceAbortRollout, + disabled: !isDeploying, + shouldConfirm: true, + }, + ], + [ + RolloutAction.Promote, + { + label: 'PROMOTE', + icon: faChevronCircleUp, + action: api.rolloutServicePromoteRollout, + body: {full: false}, + disabled: !isDeploying, + shouldConfirm: true, + }, + ], + [ + RolloutAction.PromoteFull, + { + label: 'PROMOTE-FULL', + icon: faArrowCircleUp, + action: api.rolloutServicePromoteRollout, + body: {full: true}, + disabled: !isDeploying, + shouldConfirm: true, + }, + ], + ]); - const ap = actionMap.get(props.action); + const ap = actionMap.get(action); - const [loading, setLoading] = React.useState(false); + // const [loading, setLoading] = React.useState(false); - return ( - { - setLoading(true); - await ap.action(ap.body || {}, namespaceCtx.namespace, props.rollout.objectMeta?.name || ''); - if (props.callback) { - await props.callback(); - } - setLoading(false); - }} - disabled={ap.disabled} - loading={loading} - tooltip={ap.tooltip} - icon={}> - {props.action} - - ); -}; + return ( + { + setLoading(true); + await ap.action(ap.body || {}, namespaceCtx.namespace, rollout.objectMeta?.name || ''); + if (callback) { + await callback(); + } + setLoading(false); + }} + disabled={ap.disabled} + loading={loading} + tooltip={ap.tooltip} + icon={} + > + {action} + + ); + }, +); export const RolloutActions = (props: {rollout: RolloutInfo}) => (
diff --git a/ui/src/app/components/rollout-widget/rollout-widget.scss b/ui/src/app/components/rollout-widget/rollout-widget.scss new file mode 100644 index 0000000000..44172b00af --- /dev/null +++ b/ui/src/app/components/rollout-widget/rollout-widget.scss @@ -0,0 +1,181 @@ +@import 'node_modules/argo-ui/v2/styles/colors'; + +$WIDGET_WIDTH: 400px; + +$widgetPadding: 17px; +$widgetMarginRight: 20px; +$colWidth: ($WIDGET_WIDTH + (2 * $widgetPadding)) + $widgetMarginRight; + +.rollouts-list { + display: flex; + box-sizing: border-box; + flex-wrap: wrap; + + &__search-container { + width: 50% !important; + margin: 0 auto; + } + + &__search { + width: 100%; + font-size: 15px; + } + + &__rollouts-container { + padding: 20px; + display: flex; + flex-wrap: wrap; + + width: 3 * $colWidth; + margin: 0 auto; + + @media screen and (max-width: (3 * $colWidth)) { + width: 2 * $colWidth; + margin: 0 auto; + } + + @media screen and (max-width: (2 * $colWidth)) { + width: $colWidth; + + .rollouts-list__widget { + margin: 0 inherit; + width: 100%; + } + + .rollouts-list__search-container { + width: 100% !important; + } + } + } + + &__empty-message { + padding-top: 70px; + width: 50%; + margin: 0 auto; + color: $argo-color-gray-7; + h1 { + margin-bottom: 1em; + text-align: center; + } + div { + line-height: 1.5em; + } + pre { + overflow: scroll; + cursor: pointer; + line-height: 2em; + font-size: 15px; + padding: 3px 5px; + color: $argo-color-gray-8; + margin: 0.5em 0; + background-color: white; + } + a { + color: $sea; + border-bottom: 1px solid $sea; + } + + &--dark { + color: $shine; + a { + color: $sky; + border-color: $sky; + } + pre { + background-color: $space; + color: $shine; + } + } + + @media screen and (max-width: (2 * $colWidth)) { + width: 80%; + } + } + + &__toolbar { + width: 100%; + padding: 1em 0; + background-color: white; + border-bottom: 1px solid white; + + &--dark { + border-bottom: 1px solid $silver-lining; + background-color: $space; + } + } + + &__widget { + position: relative; + box-sizing: border-box; + padding: 17px; + font-size: 14px; + margin: 0 10px; + color: $argo-color-gray-7; + width: $WIDGET_WIDTH; + height: max-content; + flex-shrink: 0; + margin-bottom: 1.5em; + border-radius: 5px; + background-color: white; + box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.05); + border: 1px solid $argo-color-gray-4; + z-index: 0; + + &:hover, + &--selected { + border-color: $argo-running-color; + } + + &__pods { + margin-bottom: 1em; + } + + &--dark { + color: $dull-shine; + border-color: $silver-lining; + box-shadow: 1px 2px 3px 1px $space; + background: none; + } + + &__refresh { + &:hover { + color: $argo-running-color; + } + } + + &__body { + margin-bottom: 1em; + padding-bottom: 0.75em; + border-bottom: 1px solid $argo-color-gray-4; + &--dark { + border-bottom: 1px solid $silver-lining; + } + } + + header { + color: $argo-color-gray-8; + display: flex; + align-items: center; + font-weight: 600; + font-size: 20px; + margin-bottom: 1em; + } + + &--dark header { + color: $shine; + border-bottom: 1px solid $silver-lining; + } + &__actions { + position: relative; + display: flex; + align-items: center; + margin-top: 1.5em; + z-index: 10 !important; + } + &__actions { + color: $argo-color-gray-7; + font-size: 14px; + margin-top: 0.5em; + } + } +} \ No newline at end of file diff --git a/ui/src/app/components/rollout-widget/rollout-widget.tsx b/ui/src/app/components/rollout-widget/rollout-widget.tsx new file mode 100644 index 0000000000..319589fdbd --- /dev/null +++ b/ui/src/app/components/rollout-widget/rollout-widget.tsx @@ -0,0 +1,107 @@ +import * as React from 'react'; +import {Link} from 'react-router-dom'; + +import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; +import {faCircleNotch, faRedoAlt} from '@fortawesome/free-solid-svg-icons'; +import {Tooltip} from 'antd'; + +import {ParsePodStatus, PodStatus, ReplicaSets} from '../pods/pods'; +import {RolloutInfo} from '../../../models/rollout/rollout'; +import {useWatchRollout} from '../../shared/services/rollout'; +import {useClickOutside} from '../../shared/utils/utils'; +import {InfoItemKind, InfoItemRow} from '../info-item/info-item'; +import {RolloutAction, RolloutActionButton} from '../rollout-actions/rollout-actions'; +import {RolloutStatus, StatusIcon} from '../status-icon/status-icon'; +import './rollout-widget.scss'; + +export const isInProgress = (rollout: RolloutInfo): boolean => { + for (const rs of rollout.replicaSets || []) { + for (const p of rs.pods || []) { + const status = ParsePodStatus(p.status); + if (status === PodStatus.Pending) { + return true; + } + } + } + return false; +}; + +export const RolloutWidget = (props: {rollout: RolloutInfo; deselect: () => void; selected?: boolean}) => { + const [watching, subscribe] = React.useState(false); + let rollout = props.rollout; + useWatchRollout(props.rollout?.objectMeta?.name, watching, null, (r: RolloutInfo) => (rollout = r)); + const ref = React.useRef(null); + useClickOutside(ref, props.deselect); + + React.useEffect(() => { + if (watching) { + const to = setTimeout(() => { + if (!isInProgress(rollout)) { + subscribe(false); + } + }, 5000); + return () => clearTimeout(to); + } + }, [watching, rollout]); + + return ( + + { + subscribe(true); + setTimeout(() => { + subscribe(false); + }, 1000); + }} + /> +
+ + {(rollout.strategy || '').toLocaleLowerCase() === 'canary' && } +
+ {/* {(rollout.replicaSets || []).length < 1 && } */} + +
{rollout.message !== 'CanaryPauseStep' && rollout.message}
+
+ subscribe(true)} indicateLoading /> + subscribe(true)} indicateLoading /> +
+ + ); +}; + +const WidgetHeader = (props: {rollout: RolloutInfo; refresh: () => void}) => { + const {rollout} = props; + const [loading, setLoading] = React.useState(false); + React.useEffect(() => { + setTimeout(() => setLoading(false), 500); + }, [loading]); + return ( +
+ {rollout.objectMeta?.name} + + + { + props.refresh(); + setLoading(true); + e.preventDefault(); + }} + /> + + + +
+ ); +}; diff --git a/ui/src/app/components/rollout/containers.tsx b/ui/src/app/components/rollout/containers.tsx index c69b30658b..552ac29a93 100644 --- a/ui/src/app/components/rollout/containers.tsx +++ b/ui/src/app/components/rollout/containers.tsx @@ -63,7 +63,8 @@ export const ContainersWidget = (props: ContainersWidgetProps) => { setError(true); } } - }}> + }} + > {error ? 'ERROR' : 'SAVE'}
diff --git a/ui/src/app/components/rollout/rollout.tsx b/ui/src/app/components/rollout/rollout.tsx index 91b6c0a9d8..317d223d2d 100644 --- a/ui/src/app/components/rollout/rollout.tsx +++ b/ui/src/app/components/rollout/rollout.tsx @@ -332,7 +332,8 @@ const Step = (props: {step: GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1 (props.step.setMirrorRoute && openMirror) ? 'steps__step-title--experiment' : '' - }`}> + }`} + > {icon && } {content} {unit} {props.step.setCanaryScale && ( @@ -457,7 +458,7 @@ const WidgetItemSetMirror = ({value}: {value: GithubComArgoprojArgoRolloutsPkgAp {index} - Path ({stringMatcherType})
{stringMatcherValue}
- + , ); } if (val.method != null) { @@ -479,7 +480,7 @@ const WidgetItemSetMirror = ({value}: {value: GithubComArgoprojArgoRolloutsPkgAp {index} - Method ({stringMatcherType})
{stringMatcherValue}
- + , ); } return fragments; diff --git a/ui/src/app/components/rollouts-grid/rollouts-grid.scss b/ui/src/app/components/rollouts-grid/rollouts-grid.scss new file mode 100644 index 0000000000..4f6e1dc22f --- /dev/null +++ b/ui/src/app/components/rollouts-grid/rollouts-grid.scss @@ -0,0 +1,8 @@ +@import 'node_modules/argo-ui/v2/styles/colors'; + +.rollouts-grid { + display: flex; + box-sizing: border-box; + flex-wrap: wrap; + padding-top: 20px; +} diff --git a/ui/src/app/components/rollouts-grid/rollouts-grid.tsx b/ui/src/app/components/rollouts-grid/rollouts-grid.tsx new file mode 100644 index 0000000000..1692d637b6 --- /dev/null +++ b/ui/src/app/components/rollouts-grid/rollouts-grid.tsx @@ -0,0 +1,19 @@ +import * as React from 'react'; + +import './rollouts-grid.scss'; +import {RolloutInfo} from '../../../models/rollout/rollout'; +import {RolloutWidget} from '../rollout-widget/rollout-widget'; + +export const RolloutsGrid = ({rollouts}: {rollouts: RolloutInfo[]}) => { + // ({ rollouts, onFavoriteChange, favorites }: { rollouts: RolloutInfo[], onFavoriteChange: (rollout: RolloutInfo) => void, favorites: { [key: string]: boolean } }) => { + // const handleFavoriteChange = (rollout: RolloutInfo) => { + // onFavoriteChange(rollout); + // }; + return ( +
+ {rollouts.map((rollout, i) => ( + {}} /> + ))} +
+ ); +}; diff --git a/ui/src/app/components/rollouts-list/rollouts-list.scss b/ui/src/app/components/rollouts-home/rollouts-home.scss similarity index 97% rename from ui/src/app/components/rollouts-list/rollouts-list.scss rename to ui/src/app/components/rollouts-home/rollouts-home.scss index f0ec5fdcc7..575c8350f6 100644 --- a/ui/src/app/components/rollouts-list/rollouts-list.scss +++ b/ui/src/app/components/rollouts-home/rollouts-home.scss @@ -6,6 +6,12 @@ $widgetPadding: 17px; $widgetMarginRight: 20px; $colWidth: ($WIDGET_WIDTH + (2 * $widgetPadding)) + $widgetMarginRight; +.rollouts-home { + height: 100vh; + display: flex; + flex-direction: column; +} + .rollouts-list { display: flex; box-sizing: border-box; diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx new file mode 100644 index 0000000000..34548c9bd4 --- /dev/null +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -0,0 +1,128 @@ +import * as React from 'react'; + +import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; +import {faCircleNotch} from '@fortawesome/free-solid-svg-icons'; + +import {NamespaceContext} from '../../shared/context/api'; +import {useWatchRollouts} from '../../shared/services/rollout'; +import {RolloutsToolbar, defaultDisplayMode} from '../rollouts-toolbar/rollouts-toolbar'; +import {RolloutsTable} from '../rollouts-table/rollouts-table'; +import {RolloutsGrid} from '../rollouts-grid/rollouts-grid'; +import {Filters} from '../rollouts-toolbar/rollouts-toolbar'; +import './rollouts-home.scss'; + +export const RolloutsHome = () => { + const rolloutsList = useWatchRollouts(); + const rollouts = rolloutsList.items; + const loading = rolloutsList.loading; + const namespaceCtx = React.useContext(NamespaceContext); + + const [filters, setFilters] = React.useState({ + showRequiresAttention: false, + showFavorites: false, + name: '', + displayMode: defaultDisplayMode, + status: { + progressing: false, + degraded: false, + paused: false, + healthy: false, + }, + }); + + const handleFilterChange = (newFilters: Filters) => { + setFilters(newFilters); + }; + + const [favorites, setFavorites] = React.useState(() => { + const favoritesStr = localStorage.getItem('rolloutsFavorites'); + return favoritesStr ? JSON.parse(favoritesStr) : {}; + }); + + const handleFavoriteChange = (rolloutName: string, isFavorite: boolean) => { + const newFavorites = {...favorites}; + if (isFavorite) { + newFavorites[rolloutName] = true; + } else { + delete newFavorites[rolloutName]; + } + setFavorites(newFavorites); + localStorage.setItem('rolloutsFavorites', JSON.stringify(newFavorites)); + }; + + const filteredRollouts = React.useMemo(() => { + console.log('filteredRollouts', filters); + let nameFilterRegex: RegExp = null; + if (filters.name) { + try { + nameFilterRegex = new RegExp(filters.name, 'i'); + } catch (e) { + console.error(e); + } + } + + return rollouts.filter((r) => { + if (filters.showFavorites && !favorites[r.objectMeta.name]) { + return false; + } + if (filters.showRequiresAttention && r.status !== 'Degraded' && r.status !== 'Paused' && r.message !== 'CanaryPauseStep') { + return false; + } + if (Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]) { + return false; + } + if (nameFilterRegex && !nameFilterRegex.test(r.objectMeta.name)) { + return false; + } + return true; + }); + }, [rollouts, filters]); + + return ( +
+ +
+ {loading ? ( +
+ + Loading... +
+ ) : (rollouts || []).length > 0 ? ( + + {filters.displayMode === 'table' && } + {filters.displayMode !== 'table' && } + + ) : ( + + )} +
+
+ ); +}; + +const EmptyMessage = (props: {namespace: string}) => { + const CodeLine = (props: {children: string}) => { + return
 navigator.clipboard.writeText(props.children)}>{props.children}
; + }; + return ( +
+

No Rollouts to display!

+
+
Make sure you are running the API server in the correct namespace. Your current namespace is:
+
+ {props.namespace} +
+
+
+ To create a new Rollout and Service, run + kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/basic/rollout.yaml + kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/basic/service.yaml + or follow the{' '} + + Getting Started guide + + . +
+
+ ); +}; diff --git a/ui/src/app/components/rollouts-list/rollouts-list.tsx b/ui/src/app/components/rollouts-list/rollouts-list.tsx deleted file mode 100644 index e8c9a4dc5f..0000000000 --- a/ui/src/app/components/rollouts-list/rollouts-list.tsx +++ /dev/null @@ -1,258 +0,0 @@ -import * as React from 'react'; -import {Key, KeybindingContext, useNav} from 'react-keyhooks'; -import {Link, useHistory} from 'react-router-dom'; -import {RolloutInfo} from '../../../models/rollout/rollout'; -import {NamespaceContext} from '../../shared/context/api'; -import {useWatchRollout, useWatchRollouts} from '../../shared/services/rollout'; -import {useClickOutside} from '../../shared/utils/utils'; -import {ParsePodStatus, PodStatus, ReplicaSets} from '../pods/pods'; -import {RolloutAction, RolloutActionButton} from '../rollout-actions/rollout-actions'; -import {RolloutStatus, StatusIcon} from '../status-icon/status-icon'; -import './rollouts-list.scss'; -import {AutoComplete, Tooltip} from 'antd'; -import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; -import {faCircleNotch, faRedoAlt} from '@fortawesome/free-solid-svg-icons'; -import {InfoItemKind, InfoItemRow} from '../info-item/info-item'; - -const useRolloutNames = (rollouts: RolloutInfo[]) => { - const parseNames = (rl: RolloutInfo[]) => - (rl || []).map((r) => { - const name = r.objectMeta?.name || ''; - return { - label: name, - value: name, - }; - }); - - const [rolloutNames, setRolloutNames] = React.useState(parseNames(rollouts)); - React.useEffect(() => { - setRolloutNames(parseNames(rollouts)); - }, [rollouts]); - - return rolloutNames; -}; - -export const RolloutsList = () => { - const rolloutsList = useWatchRollouts(); - const rollouts = rolloutsList.items; - const loading = rolloutsList.loading; - const [filteredRollouts, setFilteredRollouts] = React.useState(rollouts); - const [pos, nav, reset] = useNav(filteredRollouts.length); - const [searchString, setSearchString] = React.useState(''); - const searchParam = new URLSearchParams(window.location.search).get('q'); - React.useEffect(() => { - if (searchParam && searchParam != searchString) { - setSearchString(searchParam); - } - }, []); - - const searchRef = React.useRef(null); - - React.useEffect(() => { - if (searchRef.current) { - // or, if Input component in your ref, then use input property like: - // searchRef.current.input.focus(); - searchRef.current.focus(); - } - }, [searchRef]); - - const {useKeybinding} = React.useContext(KeybindingContext); - - useKeybinding(Key.RIGHT, () => nav(1)); - useKeybinding(Key.LEFT, () => nav(-1)); - useKeybinding(Key.ESCAPE, () => { - reset(); - if (searchString && searchString !== '') { - setSearchString(''); - return true; - } else { - return false; - } - }); - - const rolloutNames = useRolloutNames(rollouts); - const history = useHistory(); - - useKeybinding(Key.SLASH, () => { - if (!searchString) { - if (searchRef) { - searchRef.current.focus(); - } - return true; - } - return false; - }); - - useKeybinding(Key.ENTER, () => { - if (pos > -1) { - history.push(`/rollout/${filteredRollouts[pos].objectMeta?.name}`); - return true; - } - return false; - }); - - React.useEffect(() => { - const filtered = (rollouts || []).filter((r) => (r.objectMeta?.name || '').includes(searchString)); - if ((filtered || []).length > 0) { - setFilteredRollouts(filtered); - } - if (searchString) { - history.replace(`/${namespaceCtx.namespace}?q=${searchString}`); - } else { - history.replace(`/${namespaceCtx.namespace}`); - } - }, [searchString, rollouts]); - - const namespaceCtx = React.useContext(NamespaceContext); - - return ( -
- {loading ? ( -
- - Loading... -
- ) : (rollouts || []).length > 0 ? ( - -
-
- history.push(`/rollout/${namespaceCtx.namespace}/${val}`)} - options={rolloutNames} - onChange={(val) => setSearchString(val)} - value={searchString} - ref={searchRef} - /> -
-
-
- {(filteredRollouts.sort((a, b) => (a.objectMeta.name < b.objectMeta.name ? -1 : 1)) || []).map((rollout, i) => ( - reset()} /> - ))} -
-
- ) : ( - - )} -
- ); -}; - -const EmptyMessage = (props: {namespace: string}) => { - const CodeLine = (props: {children: string}) => { - return
 navigator.clipboard.writeText(props.children)}>{props.children}
; - }; - return ( -
-

No Rollouts to display!

-
-
Make sure you are running the API server in the correct namespace. Your current namespace is:
-
- {props.namespace} -
-
-
- To create a new Rollout and Service, run - kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/basic/rollout.yaml - kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/basic/service.yaml - or follow the{' '} - - Getting Started guide - - . -
-
- ); -}; - -export const isInProgress = (rollout: RolloutInfo): boolean => { - for (const rs of rollout.replicaSets || []) { - for (const p of rs.pods || []) { - const status = ParsePodStatus(p.status); - if (status === PodStatus.Pending) { - return true; - } - } - } - return false; -}; - -export const RolloutWidget = (props: {rollout: RolloutInfo; deselect: () => void; selected?: boolean}) => { - const [watching, subscribe] = React.useState(false); - let rollout = props.rollout; - useWatchRollout(props.rollout?.objectMeta?.name, watching, null, (r: RolloutInfo) => (rollout = r)); - const ref = React.useRef(null); - useClickOutside(ref, props.deselect); - - React.useEffect(() => { - if (watching) { - const to = setTimeout(() => { - if (!isInProgress(rollout)) { - subscribe(false); - } - }, 5000); - return () => clearTimeout(to); - } - }, [watching, rollout]); - - return ( - - { - subscribe(true); - setTimeout(() => { - subscribe(false); - }, 1000); - }} - /> -
- - {(rollout.strategy || '').toLocaleLowerCase() === 'canary' && } -
- {(rollout.replicaSets || []).length < 1 && } - -
- subscribe(true)} indicateLoading /> - subscribe(true)} indicateLoading /> -
- - ); -}; - -const WidgetHeader = (props: {rollout: RolloutInfo; refresh: () => void}) => { - const {rollout} = props; - const [loading, setLoading] = React.useState(false); - React.useEffect(() => { - setTimeout(() => setLoading(false), 500); - }, [loading]); - return ( -
- {rollout.objectMeta?.name} - - - { - props.refresh(); - setLoading(true); - e.preventDefault(); - }} - /> - - - -
- ); -}; diff --git a/ui/src/app/components/rollouts-table/rollouts-table.scss b/ui/src/app/components/rollouts-table/rollouts-table.scss new file mode 100644 index 0000000000..9c5eee36e0 --- /dev/null +++ b/ui/src/app/components/rollouts-table/rollouts-table.scss @@ -0,0 +1,14 @@ +@import 'node_modules/argo-ui/v2/styles/colors'; + +.rollouts-table { + width: 100%; +} + +.rollouts-table_widget_actions { + display: flex; + flex-wrap: wrap; +} + +.rollouts-table_widget_actions_button { + margin-top: 10px; +} diff --git a/ui/src/app/components/rollouts-table/rollouts-table.tsx b/ui/src/app/components/rollouts-table/rollouts-table.tsx new file mode 100644 index 0000000000..151e96553f --- /dev/null +++ b/ui/src/app/components/rollouts-table/rollouts-table.tsx @@ -0,0 +1,223 @@ +import * as React from 'react'; +import {Tooltip, Table} from 'antd'; + +import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; +import {IconDefinition} from '@fortawesome/fontawesome-svg-core'; +import {faStar as faStarSolid} from '@fortawesome/free-solid-svg-icons'; +import {faStar as faStarOutline} from '@fortawesome/free-regular-svg-icons/faStar'; + +import {RolloutAction, RolloutActionButton} from '../rollout-actions/rollout-actions'; +import {RolloutStatus, StatusIcon} from '../status-icon/status-icon'; +import {ReplicaSetStatus, ReplicaSetStatusIcon} from '../status-icon/status-icon'; +import {RolloutInfo} from '../../../models/rollout/rollout'; +import {InfoItemKind, InfoItemRow} from '../info-item/info-item'; +import './rollouts-table.scss'; + +//({rollouts}:{rollouts: RolloutInfo[]}) => { +export const RolloutsTable = ({ + rollouts, + onFavoriteChange, + favorites, +}: { + rollouts: RolloutInfo[]; + onFavoriteChange: (rolloutName: string, isFavorite: boolean) => void; + favorites: {[key: string]: boolean}; +}) => { + const handleFavoriteChange = (rolloutName: string, isFavorite: boolean) => { + onFavoriteChange(rolloutName, isFavorite); + }; + + const data = rollouts + .map((rollout) => { + return { + ...rollout, + key: rollout.objectMeta?.uid, + favorite: favorites[rollout.objectMeta?.name] || false, + }; + }) + .sort((a, b) => { + if (a.favorite && !b.favorite) { + return -1; + } else if (!a.favorite && b.favorite) { + return 1; + } else { + return 0; + } + }); + + const columns = [ + { + dataIndex: 'favorite', + key: 'favorite', + render: (favorite: boolean, rollout: RolloutInfo) => { + return favorite ? ( + + ) : ( + + ); + }, + width: 50, + }, + { + title: 'Name', + dataIndex: 'objectMeta', + key: 'name', + width: 300, + render: (objectMeta: {name?: string}) => objectMeta.name, + sorter: (a: any, b: any) => a.objectMeta.name.localeCompare(b.objectMeta.name), + }, + { + title: 'Strategy', + dataIndex: 'strategy', + key: 'strategy', + align: 'left' as const, + sorter: (a: any, b: any) => a.strategy.localeCompare(b.strategy), + render: (strategy: string) => { + return ( + + ); + }, + }, + { + title: 'Step', + dataIndex: 'step', + key: 'step', + render: (text: any, record: {step?: string}) => record.step || '-', + sorter: (a: any, b: any) => { + if (a.step === undefined) { + return -1; + } + if (b.step === undefined) { + return 1; + } else return a.step.localeCompare(b.step); + }, + }, + { + title: 'Weight', + dataIndex: 'setWeight', + key: 'weight', + render: (text: any, record: {setWeight?: number}) => record.setWeight || '-', + sorter: (a: any, b: any) => a.setWeight - b.setWeight, + }, + { + title: 'ReplicaSets', + key: 'replicasets', + width: 200, + sorter: (a: RolloutInfo, b: RolloutInfo) => a.desired - b.desired, + render: (rollout: RolloutInfo) => { + const stableReplicaSets = rollout.replicaSets?.filter((rs) => rs.stable); + const canaryReplicaSets = rollout.replicaSets?.filter((rs) => rs.canary); + const previewReplicaSets = rollout.replicaSets?.filter((rs) => rs.preview); + return ( +
+ {stableReplicaSets?.length > 0 && ( +
+ Stable:{' '} + {stableReplicaSets.map((rs) => ( + + + Rev {rs.revision} ({rs.available}/{rs.replicas}) + + + ))} +
+ )} + {canaryReplicaSets?.length > 0 && ( +
+ Canary:{' '} + {canaryReplicaSets.map((rs) => ( + + + Rev {rs.revision} ({rs.available}/{rs.replicas}) + + + ))} +
+ )} + {previewReplicaSets?.length > 0 && ( +
+ Preview:{' '} + {previewReplicaSets.map((rs) => ( + + + Rev {rs.revision} ({rs.available}/{rs.replicas}) + + + ))} +
+ )} +
+ ); + }, + }, + { + title: 'Status', + sorter: (a: any, b: any) => a.status.localeCompare(b.status), + render: (record: {message?: string; status?: string}) => { + return ( +
+ + {record.status} + +
+ ); + }, + }, + { + title: 'Actions', + dataIndex: 'actions', + key: 'actions', + render: (text: any, rollout: {objectMeta?: {name?: string}}) => { + return ( +
+
+ {}} indicateLoading /> +
+
+ {}} indicateLoading /> +
+
+ {}} indicateLoading /> +
+
+ {}} indicateLoading /> +
+
+ ); + }, + }, + ]; + + return ( +
record.objectMeta?.uid || ''} + style={{width: '100%', padding: '20px 20px'}} + rowClassName='rollouts-table__row' + onRow={(record: RolloutInfo) => ({ + onClick: () => { + window.location.href = `/rollout/${record.objectMeta?.name}`; + }, + style: {cursor: 'pointer'}, + })} + /> + ); +}; diff --git a/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.scss b/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.scss new file mode 100644 index 0000000000..81e228822e --- /dev/null +++ b/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.scss @@ -0,0 +1,43 @@ +@import 'node_modules/argo-ui/v2/styles/colors'; + +.rollouts-toolbar { + display: flex; + justify-content: space-between; + align-items: center; + padding: 10px 10px; + border-bottom: 1px solid #fff; + background-color: #fff; +} + +.rollouts-toolbar_requires-attention-checkbox { + flex: 2; + padding-left: 20px; +} + +.rollouts-toolbar_search-container { + min-width: 300px; + padding-left: 20px; + padding-right: 20px; +} + +.rollouts-toolbar_mode-button { + color: #989898; + border: none; + padding: 5px; + cursor: pointer; + transition: background-color 0.3s ease; + font-size: 24px; // increase the font-size to make the icon larger +} + +.rollouts-toolbar_mode-button:hover { + background-color: #b2b2b2; +} + +.rollouts-toolbar_mode-button.active { + color: #000000; +} + +.rollouts-toolbar_status-button { + cursor: pointer; + transition: background-color 0.3s ease; +} diff --git a/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.tsx b/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.tsx new file mode 100644 index 0000000000..6e9771c9ab --- /dev/null +++ b/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.tsx @@ -0,0 +1,198 @@ +import * as React from 'react'; + +import {useHistory, useLocation} from 'react-router-dom'; + +import {AutoComplete} from 'antd'; +import {Tooltip} from 'antd'; + +import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; +import {faTableList, faTableCellsLarge} from '@fortawesome/free-solid-svg-icons'; + +import {RolloutInfo} from '../../../models/rollout/rollout'; +import {StatusCount} from '../status-count/status-count'; +import './rollouts-toolbar.scss'; + +export type Filters = { + showRequiresAttention: boolean; + showFavorites?: boolean; + name: string; + displayMode?: string; + status: { + [key: string]: boolean; + }; +}; + +interface StatusCount { + [key: string]: number; +} + +export const defaultDisplayMode = 'table'; + +export const RolloutsToolbar = ({ + rollouts, + favorites, + onFilterChange, +}: { + rollouts: RolloutInfo[]; + favorites: {[key: string]: boolean}; + onFilterChange: (filters: Filters) => void; +}) => { + const history = useHistory(); + const location = useLocation(); + const searchParams = new URLSearchParams(window.location.search); + const [filters, setFilters] = React.useState({ + showRequiresAttention: searchParams.get('showRequiresAttention') === 'true', + showFavorites: searchParams.get('showFavorites') === 'true', + name: searchParams.get('name') || '', + displayMode: searchParams.get('displayMode') || defaultDisplayMode, + status: { + Progressing: searchParams.get('Progressing') === 'true', + Degraded: searchParams.get('Degraded') === 'true', + Paused: searchParams.get('Paused') === 'true', + Healthy: searchParams.get('Healthy') === 'true', + }, + }); + // Ensure that the filters are updated when the URL changes + onFilterChange(filters); + + const handleFilterChange = (newFilters: Filters) => { + setFilters(newFilters); + onFilterChange(newFilters); + }; + + const handleNameFilterChange = (value: string) => { + const newFilters = { + ...filters, + name: value, + }; + const searchParams = new URLSearchParams(location.search); + if (value) { + searchParams.set('name', value); + } else { + searchParams.delete('name'); + } + history.push({search: searchParams.toString()}); + handleFilterChange(newFilters); + }; + + const handleShowRequiresAttentionChange = (event: React.MouseEvent) => { + const newFilters = { + ...filters, + showRequiresAttention: !filters.showRequiresAttention, + }; + const searchParams = new URLSearchParams(location.search); + if (!filters.showRequiresAttention) { + searchParams.set('showRequiresAttention', 'true'); + } else { + searchParams.delete('showRequiresAttention'); + } + history.push({search: searchParams.toString()}); + handleFilterChange(newFilters); + }; + + const handleShowFavoritesChange = (event: React.MouseEvent) => { + const newFilters = { + ...filters, + showFavorites: !filters.showFavorites, + }; + const searchParams = new URLSearchParams(location.search); + if (!filters.showFavorites) { + searchParams.set('showFavorites', 'true'); + } else { + searchParams.delete('showFavorites'); + } + history.push({search: searchParams.toString()}); + handleFilterChange(newFilters); + }; + + const handleDisplayModeChange = (event: React.MouseEvent) => { + const newFilters = { + ...filters, + displayMode: event.currentTarget.id, + }; + const searchParams = new URLSearchParams(location.search); + if (event.currentTarget.id !== defaultDisplayMode) { + searchParams.set('displayMode', event.currentTarget.id); + } else { + searchParams.delete('displayMode'); + } + history.push({search: searchParams.toString()}); + handleFilterChange(newFilters); + }; + + const handleStatusFilterChange = (event: React.MouseEvent) => { + const newFilters = { + ...filters, + status: { + ...filters.status, + [event.currentTarget.id]: !filters.status[event.currentTarget.id], + }, + }; + const searchParams = new URLSearchParams(location.search); + if (event.currentTarget.id) { + searchParams.set(event.currentTarget.id, 'true'); + } else { + searchParams.delete(event.currentTarget.id); + } + history.push({search: searchParams.toString()}); + handleFilterChange(newFilters); + }; + + const statusCounts: StatusCount = React.useMemo(() => { + const counts: StatusCount = { + Progressing: 0, + Degraded: 0, + Paused: 0, + Healthy: 0, + }; + rollouts.forEach((r) => { + counts[r.status]++; + }); + + return counts; + }, [rollouts]); + + const needsAttentionCount: number = React.useMemo(() => { + const pausedRollouts = rollouts.filter((r) => r.status === 'Paused' && r.message !== 'CanaryPauseStep'); + return statusCounts['Degraded'] + pausedRollouts.length; + }, [rollouts, statusCounts]); + + const favoriteCount: number = React.useMemo(() => { + return rollouts.filter((r) => favorites[r.objectMeta.name]).length; + }, [rollouts, favorites]); + + return ( +
+
+ + + + + + + {Object.keys(statusCounts).map((status: string) => { + return ( + + + + ); + })} +
+
+ + +
+ +
+ ); +}; diff --git a/ui/src/app/components/status-count/status-count.scss b/ui/src/app/components/status-count/status-count.scss new file mode 100644 index 0000000000..9dec534d27 --- /dev/null +++ b/ui/src/app/components/status-count/status-count.scss @@ -0,0 +1,31 @@ +@import 'node_modules/argo-ui/v2/styles/colors'; + +.status-count { + display: flex; + align-items: center; + border: 1px solid $argo-color-gray-4; + border-radius: 5px; + padding: 2px; + margin: 1px; + + &__icon { + font-size: 15px; + color: $argo-color-gray-8; + margin: 5px; + + text-align: center; + flex: 0 0 auto; + } + + &__count { + font-size: 15px; + font-weight: 500; + color: $argo-color-gray-8; + margin-right: 5px; + text-align: right; + flex: 1; + } +} +.status-count.active { + background-color: $argo-color-teal-2; +} diff --git a/ui/src/app/components/status-count/status-count.tsx b/ui/src/app/components/status-count/status-count.tsx new file mode 100644 index 0000000000..83cea4f5ac --- /dev/null +++ b/ui/src/app/components/status-count/status-count.tsx @@ -0,0 +1,16 @@ +import * as React from 'react'; + +import {RolloutStatus, StatusIcon} from '../status-icon/status-icon'; + +import './status-count.scss'; + +export const StatusCount = ({status, count, defaultIcon = 'fa-exclamation-circle', active = false}: {status: String; count: Number; defaultIcon?: String; active?: boolean}) => { + return ( +
+
+ +
+
{count}
+
+ ); +}; diff --git a/ui/src/app/components/status-icon/status-icon.tsx b/ui/src/app/components/status-icon/status-icon.tsx index 257dc50567..5da619a357 100644 --- a/ui/src/app/components/status-icon/status-icon.tsx +++ b/ui/src/app/components/status-icon/status-icon.tsx @@ -9,9 +9,11 @@ export enum RolloutStatus { Healthy = 'Healthy', } -export const StatusIcon = (props: {status: RolloutStatus}): JSX.Element => { +export const StatusIcon = (props: {status: RolloutStatus; showTooltip?: boolean; defaultIcon?: String}): JSX.Element => { let icon, className; let spin = false; + const showTooltip = props.showTooltip ?? true; + const defaultIcon = props.defaultIcon ?? 'fa-question-circle'; const {status} = props; switch (status) { case 'Progressing': { @@ -36,14 +38,19 @@ export const StatusIcon = (props: {status: RolloutStatus}): JSX.Element => { break; } default: { - icon = 'fa-question-circle'; + icon = defaultIcon; className = 'unknown'; } } return ( - - - + + {showTooltip && ( + + + + )} + {!showTooltip && } + ); }; @@ -55,9 +62,11 @@ export enum ReplicaSetStatus { Progressing = 'Progressing', } -export const ReplicaSetStatusIcon = (props: {status: ReplicaSetStatus}) => { +export const ReplicaSetStatusIcon = (props: {status: ReplicaSetStatus; showTooltip?: boolean; defaultIcon?: String}) => { let icon, className; let spin = false; + const showTooltip = props.showTooltip ?? true; + const defaultIcon = props.defaultIcon ?? 'fa-question-circle'; const {status} = props; switch (status) { case 'Healthy': @@ -83,13 +92,18 @@ export const ReplicaSetStatusIcon = (props: {status: ReplicaSetStatus}) => { break; } default: { - icon = 'fa-question-circle'; + icon = defaultIcon; className = 'unknown'; } } return ( - - - + + {showTooltip && ( + + + + )} + {!showTooltip && } + ); }; diff --git a/ui/src/app/index.tsx b/ui/src/app/index.tsx index 3bc5d04223..56521a1185 100644 --- a/ui/src/app/index.tsx +++ b/ui/src/app/index.tsx @@ -6,5 +6,5 @@ ReactDOM.render( , - document.getElementById('root') + document.getElementById('root'), ); diff --git a/ui/src/models/rollout/analysisrun.tsx b/ui/src/models/rollout/analysisrun.tsx new file mode 100644 index 0000000000..b5129f7d9f --- /dev/null +++ b/ui/src/models/rollout/analysisrun.tsx @@ -0,0 +1,4 @@ +import * as Generated from './generated'; + +export type RolloutInfo = Generated.RolloutRolloutInfo; +export type Pod = Generated.RolloutPodInfo; From 03d8d91f653e44c591ffbf206a9208f396e4e401 Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Sat, 7 Oct 2023 13:55:16 -0400 Subject: [PATCH 052/187] use comma based search Signed-off-by: Philip Clark --- .../rollouts-home/rollouts-home.tsx | 26 +++++++++++-------- ui/yarn.lock | 12 +++++++++ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index 34548c9bd4..2f55a9bf74 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -52,14 +52,6 @@ export const RolloutsHome = () => { const filteredRollouts = React.useMemo(() => { console.log('filteredRollouts', filters); - let nameFilterRegex: RegExp = null; - if (filters.name) { - try { - nameFilterRegex = new RegExp(filters.name, 'i'); - } catch (e) { - console.error(e); - } - } return rollouts.filter((r) => { if (filters.showFavorites && !favorites[r.objectMeta.name]) { @@ -71,12 +63,24 @@ export const RolloutsHome = () => { if (Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]) { return false; } - if (nameFilterRegex && !nameFilterRegex.test(r.objectMeta.name)) { - return false; + let nameMatches = false; + for (let term of filters.name.split(',').map(t => t.trim())) { + if (term === '') continue; // Skip empty terms + if (term.startsWith('!')) { + if (!r.objectMeta.name.includes(term.substring(1))) { + nameMatches = true; + break; + } + } else if (r.objectMeta.name.includes(term)) { + nameMatches = true; + break; + } } + + if (!nameMatches) return false; return true; }); - }, [rollouts, filters]); + }, [rollouts, filters, favorites]); return (
diff --git a/ui/yarn.lock b/ui/yarn.lock index 29f5446d37..af1a13d826 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -1326,6 +1326,11 @@ resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.4.0.tgz#88da2b70d6ca18aaa6ed3687832e11f39e80624b" integrity sha512-HNii132xfomg5QVZw0HwXXpN22s7VBHQBv9CeOu9tfJnhsWQNd2lmTNi8CSrnw5B+5YOmzu1UoPAyxaXsJ6RgQ== +"@fortawesome/fontawesome-common-types@6.4.2": + version "6.4.2" + resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.4.2.tgz#1766039cad33f8ad87f9467b98e0d18fbc8f01c5" + integrity sha512-1DgP7f+XQIJbLFCTX1V2QnxVmpLdKdzzo2k8EmvDOePfchaIGQ9eCHj2up3/jNEbZuBqel5OxiaOJf37TWauRA== + "@fortawesome/fontawesome-free@^5.8.1": version "5.15.4" resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.4.tgz#ecda5712b61ac852c760d8b3c79c96adca5554e5" @@ -1338,6 +1343,13 @@ dependencies: "@fortawesome/fontawesome-common-types" "6.4.0" +"@fortawesome/free-regular-svg-icons@^6.4.0": + version "6.4.2" + resolved "https://registry.yarnpkg.com/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-6.4.2.tgz#aee79ed76ce5dd04931352f9d83700761b8b1b25" + integrity sha512-0+sIUWnkgTVVXVAPQmW4vxb9ZTHv0WstOa3rBx9iPxrrrDH6bNLsDYuwXF9b6fGm+iR7DKQvQshUH/FJm3ed9Q== + dependencies: + "@fortawesome/fontawesome-common-types" "6.4.2" + "@fortawesome/free-solid-svg-icons@^6.4.0": version "6.4.0" resolved "https://registry.yarnpkg.com/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.4.0.tgz#48c0e790847fa56299e2f26b82b39663b8ad7119" From 2dece93f0efa6dccb6e4ef9235d8dd7f2b75b2bf Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Sun, 8 Oct 2023 17:07:01 -0400 Subject: [PATCH 053/187] add labels and annotations to RolloutInfo response Signed-off-by: Philip Clark --- pkg/kubectl-argo-rollouts/info/rollout_info.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/kubectl-argo-rollouts/info/rollout_info.go b/pkg/kubectl-argo-rollouts/info/rollout_info.go index 59ee3f076a..8afc8cf02f 100644 --- a/pkg/kubectl-argo-rollouts/info/rollout_info.go +++ b/pkg/kubectl-argo-rollouts/info/rollout_info.go @@ -29,6 +29,8 @@ func NewRolloutInfo( ObjectMeta: &v1.ObjectMeta{ Name: ro.Name, Namespace: ro.Namespace, + Labels: ro.Labels, + Annotations: ro.Annotations, UID: ro.UID, CreationTimestamp: ro.CreationTimestamp, ResourceVersion: ro.ObjectMeta.ResourceVersion, From c6471366449ac4cd60d19649335cf0f015e6c843 Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Tue, 10 Oct 2023 11:01:51 -0400 Subject: [PATCH 054/187] noop Signed-off-by: Philip Clark From f6727629b9ee0c26bcf8729b17e310102acb4511 Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Wed, 11 Oct 2023 10:30:06 -0400 Subject: [PATCH 055/187] improved name filter Signed-off-by: Philip Clark --- ui/src/app/components/rollouts-home/rollouts-home.tsx | 9 +++------ .../components/rollouts-toolbar/rollouts-toolbar.scss | 4 ++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index 2f55a9bf74..6c1766dc32 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -51,8 +51,6 @@ export const RolloutsHome = () => { }; const filteredRollouts = React.useMemo(() => { - console.log('filteredRollouts', filters); - return rollouts.filter((r) => { if (filters.showFavorites && !favorites[r.objectMeta.name]) { return false; @@ -64,8 +62,8 @@ export const RolloutsHome = () => { return false; } let nameMatches = false; - for (let term of filters.name.split(',').map(t => t.trim())) { - if (term === '') continue; // Skip empty terms + for (let term of filters.name.split(',').map((t) => t.trim())) { + if (term === '') continue; // Skip empty terms if (term.startsWith('!')) { if (!r.objectMeta.name.includes(term.substring(1))) { nameMatches = true; @@ -76,8 +74,7 @@ export const RolloutsHome = () => { break; } } - - if (!nameMatches) return false; + if (filters.name != '' && !nameMatches) return false; return true; }); }, [rollouts, filters, favorites]); diff --git a/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.scss b/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.scss index 81e228822e..5acb36c0dc 100644 --- a/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.scss +++ b/ui/src/app/components/rollouts-toolbar/rollouts-toolbar.scss @@ -20,6 +20,10 @@ padding-right: 20px; } +.rollouts-toolbar_display-modes { + margin-left: auto; +} + .rollouts-toolbar_mode-button { color: #989898; border: none; From fa0cc969afd0a10bcb54898cc9328df1d62cc6df Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Wed, 11 Oct 2023 13:30:06 -0400 Subject: [PATCH 056/187] formatting Signed-off-by: Philip Clark --- ui/src/app/components/rollout/revision.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ui/src/app/components/rollout/revision.tsx b/ui/src/app/components/rollout/revision.tsx index e2fcd11526..bd7f7410ce 100644 --- a/ui/src/app/components/rollout/revision.tsx +++ b/ui/src/app/components/rollout/revision.tsx @@ -68,7 +68,8 @@ export const RevisionWidget = (props: RevisionWidgetProps) => { onClick={() => props.rollback(Number(revision.number))} type='default' icon={} - style={{fontSize: '13px', marginRight: '10px'}}> + style={{fontSize: '13px', marginRight: '10px'}} + > Rollback )} @@ -123,11 +124,13 @@ const AnalysisRunWidget = (props: {analysisRuns: RolloutAnalysisRunInfo[]}) => { {ar.status}
- }> + } + >
+ }`} + > @@ -201,7 +204,8 @@ const AnalysisRunWidget = (props: {analysisRuns: RolloutAnalysisRunInfo[]}) => { )} ); - })}> + })} + >
@@ -264,7 +268,8 @@ const AnalysisRunWidget = (props: {analysisRuns: RolloutAnalysisRunInfo[]}) => { )} ); - })}> + })} + > From f6cb5f9082600d5d314ffc4a53e2604a45bcf96f Mon Sep 17 00:00:00 2001 From: Daniel Wright Date: Wed, 6 Sep 2023 01:23:02 +1000 Subject: [PATCH 057/187] docs: replace `patchesStrategicMerge` with `patches` in tests/docs (#3010) This update ensures documentation and test examples reflect the use of the newer `patches` method, transitioning away from the deprecated `patchesStrategicMerge`. This aligns with current best practices and recommendations from the kustomize project. Signed-off-by: Daniel Wright Signed-off-by: Philip Clark --- docs/features/kustomize.md | 26 +++++++++---------- examples/notifications/kustomization.yaml | 4 +-- .../namespace-install/kustomization.yaml | 4 +-- manifests/notifications/kustomization.yaml | 20 +++++++------- test/kustomize/rollout/kustomization.yaml | 24 ++++++++--------- 5 files changed, 39 insertions(+), 39 deletions(-) diff --git a/docs/features/kustomize.md b/docs/features/kustomize.md index 4efa4144a0..e1a691b511 100644 --- a/docs/features/kustomize.md +++ b/docs/features/kustomize.md @@ -4,7 +4,7 @@ Kustomize can be extended to understand CRD objects through the use of [transformer configs](https://github.com/kubernetes-sigs/kustomize/tree/master/examples/transformerconfigs). Using transformer configs, kustomize can be "taught" about the structure of a Rollout object and leverage kustomize features such as ConfigMap/Secret generators, variable references, and common -labels & annotations. To use Rollouts with kustomize: +labels & annotations. To use Rollouts with kustomize: 1. Download [`rollout-transform.yaml`](kustomize/rollout-transform.yaml) into your kustomize directory. @@ -65,18 +65,18 @@ resources: openapi: path: https://raw.githubusercontent.com/argoproj/argo-schema-generator/main/schema/argo_all_k8s_kustomize_schema.json -patchesStrategicMerge: -- |- - apiVersion: argoproj.io/v1alpha1 - kind: Rollout - metadata: - name: rollout-canary - spec: - template: - spec: - containers: - - name: rollouts-demo - image: nginx +patches: +- patch: |- + apiVersion: argoproj.io/v1alpha1 + kind: Rollout + metadata: + name: rollout-canary + spec: + template: + spec: + containers: + - name: rollouts-demo + image: nginx ``` The OpenAPI data is auto-generated and defined in this [file](https://github.com/argoproj/argo-schema-generator/blob/main/schema/argo_all_k8s_kustomize_schema.json). diff --git a/examples/notifications/kustomization.yaml b/examples/notifications/kustomization.yaml index df8b1ffb2f..73154065be 100644 --- a/examples/notifications/kustomization.yaml +++ b/examples/notifications/kustomization.yaml @@ -4,5 +4,5 @@ kind: Kustomization resources: - ../../manifests/notifications -patchesStrategicMerge: -- configmap.yaml \ No newline at end of file +patches: +- path: configmap.yaml diff --git a/manifests/namespace-install/kustomization.yaml b/manifests/namespace-install/kustomization.yaml index 5d902d1c4c..153432ec04 100644 --- a/manifests/namespace-install/kustomization.yaml +++ b/manifests/namespace-install/kustomization.yaml @@ -8,8 +8,8 @@ bases: resources: - argo-rollouts-rolebinding.yaml -patchesStrategicMerge: -- add-namespaced-flag.yaml +patches: +- path: add-namespaced-flag.yaml patchesJson6902: - path: clusterrole-to-role.yaml diff --git a/manifests/notifications/kustomization.yaml b/manifests/notifications/kustomization.yaml index e8b7beeed9..751122f02c 100644 --- a/manifests/notifications/kustomization.yaml +++ b/manifests/notifications/kustomization.yaml @@ -4,13 +4,13 @@ kind: Kustomization resources: - argo-rollouts-notification-configmap.yaml -patchesStrategicMerge: - - on-rollout-completed.yaml - - on-scaling-replica-set.yaml - - on-rollout-step-completed.yaml - - on-rollout-updated.yaml - - on-rollout-aborted.yaml - - on-rollout-paused.yaml - - on-analysis-run-running.yaml - - on-analysis-run-error.yaml - - on-analysis-run-failed.yaml +patches: + - path: on-rollout-completed.yaml + - path: on-scaling-replica-set.yaml + - path: on-rollout-step-completed.yaml + - path: on-rollout-updated.yaml + - path: on-rollout-aborted.yaml + - path: on-rollout-paused.yaml + - path: on-analysis-run-running.yaml + - path: on-analysis-run-error.yaml + - path: on-analysis-run-failed.yaml diff --git a/test/kustomize/rollout/kustomization.yaml b/test/kustomize/rollout/kustomization.yaml index 71a3660e3c..6f451758d9 100644 --- a/test/kustomize/rollout/kustomization.yaml +++ b/test/kustomize/rollout/kustomization.yaml @@ -45,15 +45,15 @@ images: openapi: path: https://raw.githubusercontent.com/argoproj/argo-schema-generator/main/schema/argo_all_k8s_kustomize_schema.json -patchesStrategicMerge: -- |- - apiVersion: argoproj.io/v1alpha1 - kind: Rollout - metadata: - name: guestbook - spec: - template: - spec: - containers: - - name: guestbook - image: guestbook-patched:v1 +patches: +- patch: |- + apiVersion: argoproj.io/v1alpha1 + kind: Rollout + metadata: + name: guestbook + spec: + template: + spec: + containers: + - name: guestbook + image: guestbook-patched:v1 From 3b88d0241719032591ace94ea864fc42709056f1 Mon Sep 17 00:00:00 2001 From: pasha-codefresh Date: Tue, 5 Sep 2023 19:03:51 +0300 Subject: [PATCH 058/187] fix: analysis step should be ignored after promote (#3016) * fix: analysis step should be ignored after promote in case if result was inconclusive Signed-off-by: pashakostohrys * fix: analysis step should be ignored after promote in case if result was inconclusive Signed-off-by: pashakostohrys --------- Signed-off-by: pashakostohrys Signed-off-by: Philip Clark --- .../cmd/promote/promote.go | 18 ++++- .../cmd/promote/promote_test.go | 66 +++++++++++++++++++ 2 files changed, 83 insertions(+), 1 deletion(-) diff --git a/pkg/kubectl-argo-rollouts/cmd/promote/promote.go b/pkg/kubectl-argo-rollouts/cmd/promote/promote.go index d71d68573f..166f24c934 100644 --- a/pkg/kubectl-argo-rollouts/cmd/promote/promote.go +++ b/pkg/kubectl-argo-rollouts/cmd/promote/promote.go @@ -34,6 +34,7 @@ const ( setCurrentStepIndex = `{"status":{"currentStepIndex":%d}}` unpausePatch = `{"spec":{"paused":false}}` clearPauseConditionsPatch = `{"status":{"pauseConditions":null}}` + clearPauseConditionsAndControllerPausePatch = `{"status":{"pauseConditions":null, "controllerPause":false, "currentStepIndex":%d}}` unpauseAndClearPauseConditionsPatch = `{"spec":{"paused":false},"status":{"pauseConditions":null}}` promoteFullPatch = `{"status":{"promoteFull":true}}` clearPauseConditionsPatchWithStep = `{"status":{"pauseConditions":null, "currentStepIndex":%d}}` @@ -133,6 +134,10 @@ func PromoteRollout(rolloutIf clientset.RolloutInterface, name string, skipCurre return ro, nil } +func isInconclusive(rollout *v1alpha1.Rollout) bool { + return rollout.Spec.Strategy.Canary != nil && rollout.Status.Canary.CurrentStepAnalysisRunStatus != nil && rollout.Status.Canary.CurrentStepAnalysisRunStatus.Status == v1alpha1.AnalysisPhaseInconclusive +} + func getPatches(rollout *v1alpha1.Rollout, skipCurrentStep, skipAllStep, full bool) ([]byte, []byte, []byte) { var specPatch, statusPatch, unifiedPatch []byte switch { @@ -160,7 +165,18 @@ func getPatches(rollout *v1alpha1.Rollout, skipCurrentStep, skipAllStep, full bo if rollout.Spec.Paused { specPatch = []byte(unpausePatch) } - if len(rollout.Status.PauseConditions) > 0 { + // in case if canary rollout in inconclusive state, we want to unset controller pause , clean pause conditions and increment step index + // so that rollout can proceed to next step + // without such patch, rollout will be stuck in inconclusive state in case if next step is pause step + if isInconclusive(rollout) && len(rollout.Status.PauseConditions) > 0 && rollout.Status.ControllerPause { + _, index := replicasetutil.GetCurrentCanaryStep(rollout) + if index != nil { + if *index < int32(len(rollout.Spec.Strategy.Canary.Steps)) { + *index++ + } + statusPatch = []byte(fmt.Sprintf(clearPauseConditionsAndControllerPausePatch, *index)) + } + } else if len(rollout.Status.PauseConditions) > 0 { statusPatch = []byte(clearPauseConditionsPatch) } else if rollout.Spec.Strategy.Canary != nil { // we only want to clear pause conditions, or increment step index (never both) diff --git a/pkg/kubectl-argo-rollouts/cmd/promote/promote_test.go b/pkg/kubectl-argo-rollouts/cmd/promote/promote_test.go index 25c2b9929d..4a31c0a255 100644 --- a/pkg/kubectl-argo-rollouts/cmd/promote/promote_test.go +++ b/pkg/kubectl-argo-rollouts/cmd/promote/promote_test.go @@ -490,3 +490,69 @@ func TestPromoteCmdAlreadyFullyPromoted(t *testing.T) { assert.Equal(t, stdout, "rollout 'guestbook' fully promoted\n") assert.Empty(t, stderr) } + +func TestPromoteInconclusiveStep(t *testing.T) { + ro := v1alpha1.Rollout{ + ObjectMeta: metav1.ObjectMeta{ + Name: "guestbook", + Namespace: metav1.NamespaceDefault, + }, + Spec: v1alpha1.RolloutSpec{ + Paused: true, + Strategy: v1alpha1.RolloutStrategy{ + Canary: &v1alpha1.CanaryStrategy{ + Steps: []v1alpha1.CanaryStep{ + { + SetWeight: pointer.Int32Ptr(1), + }, + { + SetWeight: pointer.Int32Ptr(2), + }, + }, + }, + }, + }, + Status: v1alpha1.RolloutStatus{ + PauseConditions: []v1alpha1.PauseCondition{{ + Reason: v1alpha1.PauseReasonCanaryPauseStep, + }}, + ControllerPause: true, + Canary: v1alpha1.CanaryStatus{ + CurrentStepAnalysisRunStatus: &v1alpha1.RolloutAnalysisRunStatus{ + Status: v1alpha1.AnalysisPhaseInconclusive, + }, + }, + }, + } + + tf, o := options.NewFakeArgoRolloutsOptions(&ro) + defer tf.Cleanup() + fakeClient := o.RolloutsClient.(*fakeroclient.Clientset) + fakeClient.PrependReactor("patch", "*", func(action kubetesting.Action) (handled bool, ret runtime.Object, err error) { + if patchAction, ok := action.(kubetesting.PatchAction); ok { + patchRo := v1alpha1.Rollout{} + err := json.Unmarshal(patchAction.GetPatch(), &patchRo) + if err != nil { + panic(err) + } + ro.Status.CurrentStepIndex = patchRo.Status.CurrentStepIndex + ro.Status.ControllerPause = patchRo.Status.ControllerPause + ro.Status.PauseConditions = patchRo.Status.PauseConditions + } + return true, &ro, nil + }) + + cmd := NewCmdPromote(o) + cmd.PersistentPreRunE = o.PersistentPreRunE + cmd.SetArgs([]string{"guestbook"}) + + err := cmd.Execute() + assert.Nil(t, err) + assert.Equal(t, false, ro.Status.ControllerPause) + assert.Empty(t, ro.Status.PauseConditions) + + stdout := o.Out.(*bytes.Buffer).String() + stderr := o.ErrOut.(*bytes.Buffer).String() + assert.Equal(t, stdout, "rollout 'guestbook' promoted\n") + assert.Empty(t, stderr) +} From 11ed178e2e17a340f1ad14d63349340b7da8fd04 Mon Sep 17 00:00:00 2001 From: izturn <44051386+izturn@users.noreply.github.com> Date: Wed, 6 Sep 2023 01:03:26 +0800 Subject: [PATCH 059/187] refactor: rename interface{} => any (#3000) * rename interface{} => any Signed-off-by: gang.liu * revert change to generated code Signed-off-by: gang.liu --------- Signed-off-by: gang.liu Signed-off-by: Philip Clark --- analysis/controller.go | 20 +-- analysis/controller_test.go | 4 +- controller/metrics/metrics_test.go | 2 +- experiments/controller.go | 36 +++--- experiments/controller_test.go | 10 +- experiments/experiment.go | 4 +- experiments/experiment_test.go | 8 +- hack/gen-crd-spec/main.go | 44 +++---- hack/gen-docs/main.go | 14 +-- ingress/ingress.go | 12 +- ingress/ingress_test.go | 2 +- metricproviders/graphite/api.go | 2 +- metricproviders/influxdb/influxdb.go | 2 +- metricproviders/influxdb/mock_test.go | 4 +- metricproviders/kayenta/kayenta.go | 4 +- metricproviders/kayenta/kayenta_test.go | 4 +- metricproviders/newrelic/newrelic.go | 2 +- metricproviders/newrelic/newrelic_test.go | 18 +-- metricproviders/plugin/rpc/rpc.go | 32 ++--- metricproviders/skywalking/mock_test.go | 4 +- metricproviders/skywalking/skywalking.go | 10 +- metricproviders/skywalking/skywalking_test.go | 12 +- metricproviders/webmetric/webmetric.go | 4 +- .../validation/validation_references.go | 2 +- .../cmd/create/create.go | 4 +- pkg/kubectl-argo-rollouts/cmd/lint/lint.go | 4 +- .../cmd/list/list_experiments.go | 2 +- .../cmd/list/rollloutinfo.go | 6 +- .../cmd/set/set_image.go | 4 +- pkg/kubectl-argo-rollouts/cmd/undo/undo.go | 8 +- .../viewcontroller/viewcontroller.go | 20 +-- rollout/canary_test.go | 20 +-- rollout/controller.go | 30 ++--- rollout/controller_test.go | 12 +- rollout/replicaset_test.go | 2 +- rollout/restart.go | 2 +- rollout/restart_test.go | 32 ++--- rollout/templateref.go | 18 +-- rollout/trafficrouting/apisix/apisix.go | 46 +++---- rollout/trafficrouting/apisix/apisix_test.go | 48 +++---- rollout/trafficrouting/apisix/mocks/apisix.go | 4 +- rollout/trafficrouting/appmesh/appmesh.go | 20 +-- .../trafficrouting/appmesh/appmesh_test.go | 30 ++--- .../trafficrouting/appmesh/resource_client.go | 2 +- rollout/trafficrouting/istio/controller.go | 22 ++-- .../trafficrouting/istio/controller_test.go | 8 +- rollout/trafficrouting/istio/istio.go | 118 +++++++++--------- rollout/trafficrouting/istio/istio_test.go | 54 ++++---- rollout/trafficrouting/istio/istio_types.go | 2 +- rollout/trafficrouting/plugin/rpc/rpc.go | 36 +++--- .../trafficrouting/traefik/mocks/traefik.go | 4 +- rollout/trafficrouting/traefik/traefik.go | 6 +- .../trafficrouting/traefik/traefik_test.go | 14 +-- rollout/trafficrouting_test.go | 2 +- server/server.go | 6 +- service/service.go | 12 +- service/service_test.go | 2 +- test/e2e/apisix_test.go | 11 +- test/e2e/appmesh_test.go | 4 +- test/e2e/functional_test.go | 4 +- test/fixtures/given.go | 2 +- test/fixtures/then.go | 2 +- test/fixtures/when.go | 6 +- test/util/util.go | 2 +- utils/analysis/factory.go | 10 +- utils/analysis/helpers.go | 4 +- utils/analysis/helpers_test.go | 2 +- utils/aws/aws.go | 4 +- utils/controller/controller.go | 12 +- utils/controller/controller_test.go | 34 ++--- utils/diff/diff.go | 2 +- utils/evaluate/evaluate.go | 22 ++-- utils/evaluate/evaluate_test.go | 14 +-- utils/json/json.go | 6 +- utils/json/json_test.go | 2 +- utils/log/log.go | 4 +- utils/record/record.go | 32 ++--- utils/record/record_test.go | 4 +- .../tolerantinformer/tolerantinformer_test.go | 2 +- utils/tolerantinformer/tollerantinformer.go | 4 +- utils/unstructured/unstructured.go | 12 +- 81 files changed, 529 insertions(+), 528 deletions(-) diff --git a/analysis/controller.go b/analysis/controller.go index 505e6f005c..b3519619ae 100644 --- a/analysis/controller.go +++ b/analysis/controller.go @@ -49,8 +49,8 @@ type Controller struct { newProvider func(logCtx log.Entry, metric v1alpha1.Metric) (metric.Provider, error) // used for unit testing - enqueueAnalysis func(obj interface{}) - enqueueAnalysisAfter func(obj interface{}, duration time.Duration) + enqueueAnalysis func(obj any) + enqueueAnalysisAfter func(obj any, duration time.Duration) // workqueue is a rate limited work queue. This is used to queue work to be // processed instead of performing it as soon as a change happens. This @@ -91,10 +91,10 @@ func NewController(cfg ControllerConfig) *Controller { resyncPeriod: cfg.ResyncPeriod, } - controller.enqueueAnalysis = func(obj interface{}) { + controller.enqueueAnalysis = func(obj any) { controllerutil.Enqueue(obj, cfg.AnalysisRunWorkQueue) } - controller.enqueueAnalysisAfter = func(obj interface{}, duration time.Duration) { + controller.enqueueAnalysisAfter = func(obj any, duration time.Duration) { controllerutil.EnqueueAfter(obj, duration, cfg.AnalysisRunWorkQueue) } @@ -105,13 +105,13 @@ func NewController(cfg ControllerConfig) *Controller { controller.newProvider = providerFactory.NewProvider cfg.JobInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { controller.enqueueIfCompleted(obj) }, - UpdateFunc: func(oldObj, newObj interface{}) { + UpdateFunc: func(oldObj, newObj any) { controller.enqueueIfCompleted(newObj) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { controller.enqueueIfCompleted(obj) }, }) @@ -120,10 +120,10 @@ func NewController(cfg ControllerConfig) *Controller { // Set up an event handler for when analysis resources change cfg.AnalysisRunInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAnalysis, - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { controller.enqueueAnalysis(new) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { controller.enqueueAnalysis(obj) if ar := unstructuredutil.ObjectToAnalysisRun(obj); ar != nil { logCtx := logutil.WithAnalysisRun(ar) @@ -186,7 +186,7 @@ func (c *Controller) syncHandler(ctx context.Context, key string) error { return c.persistAnalysisRunStatus(run, newRun.Status) } -func (c *Controller) enqueueIfCompleted(obj interface{}) { +func (c *Controller) enqueueIfCompleted(obj any) { job, ok := obj.(*batchv1.Job) if !ok { return diff --git a/analysis/controller_test.go b/analysis/controller_test.go index cde8ba853e..032f5cf74d 100644 --- a/analysis/controller_test.go +++ b/analysis/controller_test.go @@ -113,7 +113,7 @@ func (f *fixture) newController(resync resyncFunc) (*Controller, informers.Share Recorder: record.NewFakeEventRecorder(), }) - c.enqueueAnalysis = func(obj interface{}) { + c.enqueueAnalysis = func(obj any) { var key string var err error if key, err = cache.MetaNamespaceKeyFunc(obj); err != nil { @@ -127,7 +127,7 @@ func (f *fixture) newController(resync resyncFunc) (*Controller, informers.Share f.enqueuedObjects[key] = count c.analysisRunWorkQueue.Add(obj) } - c.enqueueAnalysisAfter = func(obj interface{}, duration time.Duration) { + c.enqueueAnalysisAfter = func(obj any, duration time.Duration) { c.enqueueAnalysis(obj) } f.provider = &mocks.Provider{} diff --git a/controller/metrics/metrics_test.go b/controller/metrics/metrics_test.go index 00700321fa..ced10b2442 100644 --- a/controller/metrics/metrics_test.go +++ b/controller/metrics/metrics_test.go @@ -54,7 +54,7 @@ func newFakeServerConfig(objs ...runtime.Object) ServerConfig { } } -func testHttpResponse(t *testing.T, handler http.Handler, expectedResponse string, testFunc func(t assert.TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) bool) { +func testHttpResponse(t *testing.T, handler http.Handler, expectedResponse string, testFunc func(t assert.TestingT, s any, contains any, msgAndArgs ...any) bool) { t.Helper() req, err := http.NewRequest("GET", "/metrics", nil) assert.NoError(t, err) diff --git a/experiments/controller.go b/experiments/controller.go index a42821aab0..3aa1519e46 100644 --- a/experiments/controller.go +++ b/experiments/controller.go @@ -63,8 +63,8 @@ type Controller struct { metricsServer *metrics.MetricsServer // used for unit testing - enqueueExperiment func(obj interface{}) - enqueueExperimentAfter func(obj interface{}, duration time.Duration) + enqueueExperiment func(obj any) + enqueueExperimentAfter func(obj any, duration time.Duration) // workqueue is a rate limited work queue. This is used to queue work to be // processed instead of performing it as soon as a change happens. This @@ -127,10 +127,10 @@ func NewController(cfg ControllerConfig) *Controller { resyncPeriod: cfg.ResyncPeriod, } - controller.enqueueExperiment = func(obj interface{}) { + controller.enqueueExperiment = func(obj any) { controllerutil.Enqueue(obj, cfg.ExperimentWorkQueue) } - controller.enqueueExperimentAfter = func(obj interface{}, duration time.Duration) { + controller.enqueueExperimentAfter = func(obj any, duration time.Duration) { controllerutil.EnqueueAfter(obj, duration, cfg.ExperimentWorkQueue) } @@ -138,20 +138,20 @@ func NewController(cfg ControllerConfig) *Controller { // Set up an event handler for when experiment resources change cfg.ExperimentsInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueExperiment, - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { controller.enqueueExperiment(new) }, DeleteFunc: controller.enqueueExperiment, }) cfg.ExperimentsInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { - enqueueRollout := func(obj interface{}) { + AddFunc: func(obj any) { + enqueueRollout := func(obj any) { controllerutil.Enqueue(obj, cfg.RolloutWorkQueue) } controllerutil.EnqueueParentObject(obj, register.RolloutKind, enqueueRollout) }, - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { oldAcc, err := meta.Accessor(old) if err != nil { return @@ -165,13 +165,13 @@ func NewController(cfg ControllerConfig) *Controller { // Two different versions of the same Replica will always have different RVs. return } - enqueueRollout := func(obj interface{}) { + enqueueRollout := func(obj any) { controllerutil.Enqueue(obj, cfg.RolloutWorkQueue) } controllerutil.EnqueueParentObject(new, register.RolloutKind, enqueueRollout) }, - DeleteFunc: func(obj interface{}) { - enqueueRollout := func(obj interface{}) { + DeleteFunc: func(obj any) { + enqueueRollout := func(obj any) { controllerutil.Enqueue(obj, cfg.RolloutWorkQueue) } controllerutil.EnqueueParentObject(obj, register.RolloutKind, enqueueRollout) @@ -184,10 +184,10 @@ func NewController(cfg ControllerConfig) *Controller { }) cfg.ReplicaSetInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { controllerutil.EnqueueParentObject(obj, register.ExperimentKind, controller.enqueueExperiment) }, - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { newRS := new.(*appsv1.ReplicaSet) oldRS := old.(*appsv1.ReplicaSet) if newRS.ResourceVersion == oldRS.ResourceVersion { @@ -204,19 +204,19 @@ func NewController(cfg ControllerConfig) *Controller { } controllerutil.EnqueueParentObject(new, register.ExperimentKind, controller.enqueueExperiment) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { controllerutil.EnqueueParentObject(obj, register.ExperimentKind, controller.enqueueExperiment) }, }) cfg.AnalysisRunInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { controller.enqueueIfCompleted(obj) }, - UpdateFunc: func(oldObj, newObj interface{}) { + UpdateFunc: func(oldObj, newObj any) { controller.enqueueIfCompleted(newObj) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { controller.enqueueIfCompleted(obj) }, }) @@ -346,7 +346,7 @@ func (ec *Controller) persistExperimentStatus(orig *v1alpha1.Experiment, newStat } // enqueueIfCompleted conditionally enqueues the AnalysisRun's Experiment if the run is complete -func (ec *Controller) enqueueIfCompleted(obj interface{}) { +func (ec *Controller) enqueueIfCompleted(obj any) { run := unstructuredutil.ObjectToAnalysisRun(obj) if run == nil { return diff --git a/experiments/controller_test.go b/experiments/controller_test.go index 1e7eb14f13..26587b6346 100644 --- a/experiments/controller_test.go +++ b/experiments/controller_test.go @@ -302,12 +302,12 @@ func generateRSName(ex *v1alpha1.Experiment, template v1alpha1.TemplateSpec) str } func calculatePatch(ex *v1alpha1.Experiment, patch string, templates []v1alpha1.TemplateStatus, condition *v1alpha1.ExperimentCondition) string { - patchMap := make(map[string]interface{}) + patchMap := make(map[string]any) err := json.Unmarshal([]byte(patch), &patchMap) if err != nil { panic(err) } - newStatus := patchMap["status"].(map[string]interface{}) + newStatus := patchMap["status"].(map[string]any) if templates != nil { newStatus["templateStatuses"] = templates patchMap["status"] = newStatus @@ -334,7 +334,7 @@ func calculatePatch(ex *v1alpha1.Experiment, patch string, templates []v1alpha1. newEx := &v1alpha1.Experiment{} json.Unmarshal(newBytes, newEx) - newPatch := make(map[string]interface{}) + newPatch := make(map[string]any) json.Unmarshal(patchBytes, &newPatch) newPatchBytes, _ := json.Marshal(newPatch) return string(newPatchBytes) @@ -380,7 +380,7 @@ func (f *fixture) newController(resync resyncFunc) (*Controller, informers.Share }) var enqueuedObjectsLock sync.Mutex - c.enqueueExperiment = func(obj interface{}) { + c.enqueueExperiment = func(obj any) { var key string var err error if key, err = cache.MetaNamespaceKeyFunc(obj); err != nil { @@ -396,7 +396,7 @@ func (f *fixture) newController(resync resyncFunc) (*Controller, informers.Share f.enqueuedObjects[key] = count c.experimentWorkqueue.Add(obj) } - c.enqueueExperimentAfter = func(obj interface{}, duration time.Duration) { + c.enqueueExperimentAfter = func(obj any, duration time.Duration) { c.enqueueExperiment(obj) } diff --git a/experiments/experiment.go b/experiments/experiment.go index 7327c5a8b6..e4f0f53ede 100644 --- a/experiments/experiment.go +++ b/experiments/experiment.go @@ -46,7 +46,7 @@ type experimentContext struct { replicaSetLister appslisters.ReplicaSetLister serviceLister v1.ServiceLister recorder record.EventRecorder - enqueueExperimentAfter func(obj interface{}, duration time.Duration) + enqueueExperimentAfter func(obj any, duration time.Duration) resyncPeriod time.Duration // calculated values during reconciliation @@ -70,7 +70,7 @@ func newExperimentContext( serviceLister v1.ServiceLister, recorder record.EventRecorder, resyncPeriod time.Duration, - enqueueExperimentAfter func(obj interface{}, duration time.Duration), + enqueueExperimentAfter func(obj any, duration time.Duration), ) *experimentContext { exCtx := experimentContext{ diff --git a/experiments/experiment_test.go b/experiments/experiment_test.go index 0853a3b361..e047082cee 100644 --- a/experiments/experiment_test.go +++ b/experiments/experiment_test.go @@ -62,7 +62,7 @@ func newTestContext(ex *v1alpha1.Experiment, objects ...runtime.Object) *experim serviceLister, record.NewFakeEventRecorder(), noResyncPeriodFunc(), - func(obj interface{}, duration time.Duration) {}, + func(obj any, duration time.Duration) {}, ) } @@ -302,7 +302,7 @@ func TestDontRequeueWithoutDuration(t *testing.T) { fakeClient := exCtx.kubeclientset.(*k8sfake.Clientset) fakeClient.Tracker().Add(rs1) enqueueCalled := false - exCtx.enqueueExperimentAfter = func(obj interface{}, duration time.Duration) { + exCtx.enqueueExperimentAfter = func(obj any, duration time.Duration) { enqueueCalled = true } newStatus := exCtx.reconcile() @@ -325,7 +325,7 @@ func TestRequeueAfterDuration(t *testing.T) { "bar": rs1, } enqueueCalled := false - exCtx.enqueueExperimentAfter = func(obj interface{}, duration time.Duration) { + exCtx.enqueueExperimentAfter = func(obj any, duration time.Duration) { enqueueCalled = true // ensures we are enqueued around ~20 seconds twentySeconds := time.Second * time.Duration(20) @@ -352,7 +352,7 @@ func TestRequeueAfterProgressDeadlineSeconds(t *testing.T) { "bar": rs1, } enqueueCalled := false - exCtx.enqueueExperimentAfter = func(obj interface{}, duration time.Duration) { + exCtx.enqueueExperimentAfter = func(obj any, duration time.Duration) { enqueueCalled = true // ensures we are enqueued around 10 minutes tenMinutes := time.Second * time.Duration(600) diff --git a/hack/gen-crd-spec/main.go b/hack/gen-crd-spec/main.go index 97156308a5..c879472a53 100644 --- a/hack/gen-crd-spec/main.go +++ b/hack/gen-crd-spec/main.go @@ -31,7 +31,7 @@ const metadataValidation = `properties: type: object type: object` -var preserveUnknownFields = map[string]interface{}{ +var preserveUnknownFields = map[string]any{ "x-kubernetes-preserve-unknown-fields": true, } @@ -43,7 +43,7 @@ var crdPaths = map[string]string{ "AnalysisRun": "manifests/crds/analysis-run-crd.yaml", } -func setValidationOverride(un *unstructured.Unstructured, fieldOverride map[string]interface{}, path string) { +func setValidationOverride(un *unstructured.Unstructured, fieldOverride map[string]any, path string) { // Prepare variables preSchemaPath := []string{"spec", "versions"} objVersions, _, _ := unstructured.NestedSlice(un.Object, preSchemaPath...) @@ -59,11 +59,11 @@ func setValidationOverride(un *unstructured.Unstructured, fieldOverride map[stri } // Loop over version's slice - var finalOverride []interface{} + var finalOverride []any for _, v := range objVersions { - unstructured.SetNestedMap(v.(map[string]interface{}), fieldOverride, schemaPath...) + unstructured.SetNestedMap(v.(map[string]any), fieldOverride, schemaPath...) - _, ok, err := unstructured.NestedFieldNoCopy(v.(map[string]interface{}), schemaPath...) + _, ok, err := unstructured.NestedFieldNoCopy(v.(map[string]any), schemaPath...) checkErr(err) if !ok { panic(fmt.Sprintf("%s not found for kind %s", schemaPath, crdKind(un))) @@ -153,7 +153,7 @@ func createMetadataValidation(un *unstructured.Unstructured) { switch kind { case "Rollout": - var roValidated []interface{} + var roValidated []any roPath := []string{ "template", "properties", @@ -161,12 +161,12 @@ func createMetadataValidation(un *unstructured.Unstructured) { } roPath = append(path, roPath...) for _, v := range objVersions { - unstructured.SetNestedMap(v.(map[string]interface{}), metadataValidationObj.Object, roPath...) + unstructured.SetNestedMap(v.(map[string]any), metadataValidationObj.Object, roPath...) roValidated = append(roValidated, v) } unstructured.SetNestedSlice(un.Object, roValidated, prePath...) case "Experiment": - var exValidated []interface{} + var exValidated []any exPath := []string{ "templates", "items", @@ -177,12 +177,12 @@ func createMetadataValidation(un *unstructured.Unstructured) { } exPath = append(path, exPath...) for _, v := range objVersions { - unstructured.SetNestedMap(v.(map[string]interface{}), metadataValidationObj.Object, exPath...) + unstructured.SetNestedMap(v.(map[string]any), metadataValidationObj.Object, exPath...) exValidated = append(exValidated, v) } unstructured.SetNestedSlice(un.Object, exValidated, prePath...) case "ClusterAnalysisTemplate", "AnalysisTemplate", "AnalysisRun": - var analysisValidated []interface{} + var analysisValidated []any analysisPath := []string{ "metrics", "items", @@ -196,12 +196,12 @@ func createMetadataValidation(un *unstructured.Unstructured) { analysisPathJobMetadata := append(analysisPath, "metadata") for _, v := range objVersions { - unstructured.SetNestedMap(v.(map[string]interface{}), metadataValidationObj.Object, analysisPathJobMetadata...) + unstructured.SetNestedMap(v.(map[string]any), metadataValidationObj.Object, analysisPathJobMetadata...) analysisValidated = append(analysisValidated, v) } unstructured.SetNestedSlice(un.Object, analysisValidated, prePath...) - var analysisJobValidated []interface{} + var analysisJobValidated []any analysisPathJobTemplateMetadata := []string{ "spec", "properties", @@ -211,7 +211,7 @@ func createMetadataValidation(un *unstructured.Unstructured) { } analysisPathJobTemplateMetadata = append(analysisPath, analysisPathJobTemplateMetadata...) for _, v := range objVersions { - unstructured.SetNestedMap(v.(map[string]interface{}), metadataValidationObj.Object, analysisPathJobTemplateMetadata...) + unstructured.SetNestedMap(v.(map[string]any), metadataValidationObj.Object, analysisPathJobTemplateMetadata...) analysisJobValidated = append(analysisJobValidated, v) } unstructured.SetNestedSlice(un.Object, analysisJobValidated, prePath...) @@ -326,7 +326,7 @@ var patchAnnotationKeys = map[string]bool{ // injectPatchAnnotations injects patch annotations from given schema definitions and drop properties that don't have // patch annotations injected -func injectPatchAnnotations(prop map[string]interface{}, propSchema spec.Schema, schemaDefinitions spec.Definitions) (bool, error) { +func injectPatchAnnotations(prop map[string]any, propSchema spec.Schema, schemaDefinitions spec.Definitions) (bool, error) { injected := false for k, v := range propSchema.Extensions { if patchAnnotationKeys[k] { @@ -349,13 +349,13 @@ func injectPatchAnnotations(prop map[string]interface{}, propSchema spec.Schema, propSchemas = schema.Properties } - childProps, ok := prop["properties"].(map[string]interface{}) + childProps, ok := prop["properties"].(map[string]any) if !ok { - childProps = map[string]interface{}{} + childProps = map[string]any{} } for k, v := range childProps { - childInjected, err := injectPatchAnnotations(v.(map[string]interface{}), propSchemas[k], schemaDefinitions) + childInjected, err := injectPatchAnnotations(v.(map[string]any), propSchemas[k], schemaDefinitions) if err != nil { return false, err } @@ -390,7 +390,7 @@ func generateKustomizeSchema(crds []*extensionsobj.CustomResourceDefinition, out schemaDefinitions[normalizeRef(k)] = v.Schema } - definitions := map[string]interface{}{} + definitions := map[string]any{} for _, crd := range crds { var version string var props map[string]extensionsobj.JSONSchemaProps @@ -406,7 +406,7 @@ func generateKustomizeSchema(crds []*extensionsobj.CustomResourceDefinition, out if err != nil { return err } - propsMap := map[string]interface{}{} + propsMap := map[string]any{} err = json.Unmarshal(data, &propsMap) if err != nil { return err @@ -414,7 +414,7 @@ func generateKustomizeSchema(crds []*extensionsobj.CustomResourceDefinition, out crdSchema := schemaDefinitions[normalizeRef(fmt.Sprintf("%s/%s.%s", rolloutsDefinitionsPrefix, version, crd.Spec.Names.Kind))] for k, p := range propsMap { - injected, err := injectPatchAnnotations(p.(map[string]interface{}), crdSchema.Properties[k], schemaDefinitions) + injected, err := injectPatchAnnotations(p.(map[string]any), crdSchema.Properties[k], schemaDefinitions) if err != nil { return err } @@ -426,7 +426,7 @@ func generateKustomizeSchema(crds []*extensionsobj.CustomResourceDefinition, out } definitionName := kubeopenapiutil.ToRESTFriendlyName(fmt.Sprintf("%s/%s.%s", crd.Spec.Group, version, crd.Spec.Names.Kind)) - definitions[definitionName] = map[string]interface{}{ + definitions[definitionName] = map[string]any{ "properties": propsMap, "x-kubernetes-group-version-kind": []map[string]string{{ "group": crd.Spec.Group, @@ -435,7 +435,7 @@ func generateKustomizeSchema(crds []*extensionsobj.CustomResourceDefinition, out }}, } } - data, err := json.MarshalIndent(map[string]interface{}{ + data, err := json.MarshalIndent(map[string]any{ "definitions": definitions, }, "", " ") if err != nil { diff --git a/hack/gen-docs/main.go b/hack/gen-docs/main.go index 4e29e355be..b00f7988e2 100644 --- a/hack/gen-docs/main.go +++ b/hack/gen-docs/main.go @@ -73,15 +73,15 @@ func updateMkDocsNav(parent string, child string, files []string) error { if e := yaml.Unmarshal(data, &un.Object); e != nil { return e } - nav := un.Object["nav"].([]interface{}) + nav := un.Object["nav"].([]any) navitem, _ := findNavItem(nav, parent) if navitem == nil { return fmt.Errorf("Can't find '%s' nav item in mkdoc.yml", parent) } - navitemmap := navitem.(map[interface{}]interface{}) - subnav := navitemmap[parent].([]interface{}) + navitemmap := navitem.(map[any]any) + subnav := navitemmap[parent].([]any) subnav = removeNavItem(subnav, child) - commands := make(map[string]interface{}) + commands := make(map[string]any) commands[child] = files navitemmap[parent] = append(subnav, commands) @@ -92,9 +92,9 @@ func updateMkDocsNav(parent string, child string, files []string) error { return os.WriteFile("mkdocs.yml", newmkdocs, 0644) } -func findNavItem(nav []interface{}, key string) (interface{}, int) { +func findNavItem(nav []any, key string) (any, int) { for i, item := range nav { - o, ismap := item.(map[interface{}]interface{}) + o, ismap := item.(map[any]any) if ismap { if _, ok := o[key]; ok { return o, i @@ -104,7 +104,7 @@ func findNavItem(nav []interface{}, key string) (interface{}, int) { return nil, -1 } -func removeNavItem(nav []interface{}, key string) []interface{} { +func removeNavItem(nav []any, key string) []any { _, i := findNavItem(nav, key) if i != -1 { nav = append(nav[:i], nav[i+1:]...) diff --git a/ingress/ingress.go b/ingress/ingress.go index 6c4059e476..8af5327891 100644 --- a/ingress/ingress.go +++ b/ingress/ingress.go @@ -51,7 +51,7 @@ type Controller struct { ingressWorkqueue workqueue.RateLimitingInterface metricServer *metrics.MetricsServer - enqueueRollout func(obj interface{}) + enqueueRollout func(obj any) albClasses []string nginxClasses []string } @@ -76,7 +76,7 @@ func NewController(cfg ControllerConfig) *Controller { } util.CheckErr(cfg.RolloutsInformer.Informer().AddIndexers(cache.Indexers{ - ingressIndexName: func(obj interface{}) ([]string, error) { + ingressIndexName: func(obj any) ([]string, error) { if ro := unstructuredutil.ObjectToRollout(obj); ro != nil { return ingressutil.GetRolloutIngressKeys(ro), nil } @@ -85,17 +85,17 @@ func NewController(cfg ControllerConfig) *Controller { })) cfg.IngressWrap.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { controllerutil.Enqueue(obj, cfg.IngressWorkQueue) }, - UpdateFunc: func(oldObj, newObj interface{}) { + UpdateFunc: func(oldObj, newObj any) { controllerutil.Enqueue(newObj, cfg.IngressWorkQueue) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { controllerutil.Enqueue(obj, cfg.IngressWorkQueue) }, }) - controller.enqueueRollout = func(obj interface{}) { + controller.enqueueRollout = func(obj any) { controllerutil.EnqueueRateLimited(obj, cfg.RolloutWorkQueue) } diff --git a/ingress/ingress_test.go b/ingress/ingress_test.go index 92ebcc09d4..be588dd51a 100644 --- a/ingress/ingress_test.go +++ b/ingress/ingress_test.go @@ -148,7 +148,7 @@ func underlyingControllerBuilder(t *testing.T, ing []*extensionsv1beta1.Ingress, }) enqueuedObjects := map[string]int{} var enqueuedObjectsLock sync.Mutex - c.enqueueRollout = func(obj interface{}) { + c.enqueueRollout = func(obj any) { var key string var err error if key, err = cache.MetaNamespaceKeyFunc(obj); err != nil { diff --git a/metricproviders/graphite/api.go b/metricproviders/graphite/api.go index 06833ac028..bd470de474 100644 --- a/metricproviders/graphite/api.go +++ b/metricproviders/graphite/api.go @@ -87,7 +87,7 @@ type dataPoint struct { } func (gdp *dataPoint) UnmarshalJSON(data []byte) error { - var v []interface{} + var v []any if err := json.Unmarshal(data, &v); err != nil { return err } diff --git a/metricproviders/influxdb/influxdb.go b/metricproviders/influxdb/influxdb.go index f67c8d5f94..4266d2e2f6 100644 --- a/metricproviders/influxdb/influxdb.go +++ b/metricproviders/influxdb/influxdb.go @@ -87,7 +87,7 @@ func (p *Provider) GarbageCollect(run *v1alpha1.AnalysisRun, metric v1alpha1.Met } func (p *Provider) processResponse(metric v1alpha1.Metric, result *influxapi.QueryTableResult) (string, v1alpha1.AnalysisPhase, error) { - var res []interface{} + var res []any if result == nil { return "", v1alpha1.AnalysisPhaseError, fmt.Errorf("no QueryTableResult returned from flux query") } diff --git a/metricproviders/influxdb/mock_test.go b/metricproviders/influxdb/mock_test.go index 3aff084802..558efa9a45 100644 --- a/metricproviders/influxdb/mock_test.go +++ b/metricproviders/influxdb/mock_test.go @@ -23,10 +23,10 @@ func (m mockAPI) QueryRaw(context.Context, string, *domain.Dialect) (string, err panic("Not used") } -func (m mockAPI) QueryRawWithParams(ctx context.Context, query string, dialect *domain.Dialect, params interface{}) (string, error) { +func (m mockAPI) QueryRawWithParams(ctx context.Context, query string, dialect *domain.Dialect, params any) (string, error) { panic("Not used") } -func (m mockAPI) QueryWithParams(ctx context.Context, query string, params interface{}) (*influxapi.QueryTableResult, error) { +func (m mockAPI) QueryWithParams(ctx context.Context, query string, params any) (*influxapi.QueryTableResult, error) { panic("Not used") } diff --git a/metricproviders/kayenta/kayenta.go b/metricproviders/kayenta/kayenta.go index a6b93f40e6..79f47c5f28 100644 --- a/metricproviders/kayenta/kayenta.go +++ b/metricproviders/kayenta/kayenta.go @@ -146,7 +146,7 @@ func (p *Provider) Run(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric) v1alph if err != nil { return metricutil.MarkMeasurementError(newMeasurement, err) } - var dat map[string]interface{} + var dat map[string]any if err := json.Unmarshal(data, &dat); err != nil { return metricutil.MarkMeasurementError(newMeasurement, err) } @@ -185,7 +185,7 @@ func (p *Provider) Resume(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric, mea return metricutil.MarkMeasurementError(measurement, err) } - patch := make(map[string]interface{}) + patch := make(map[string]any) err = json.Unmarshal(data, &patch) if err != nil { diff --git a/metricproviders/kayenta/kayenta_test.go b/metricproviders/kayenta/kayenta_test.go index abfed0f7c1..548f868bfb 100644 --- a/metricproviders/kayenta/kayenta_test.go +++ b/metricproviders/kayenta/kayenta_test.go @@ -157,12 +157,12 @@ func TestRunSuccessfully(t *testing.T) { if err != nil { panic(err) } - bodyI := map[string]interface{}{} + bodyI := map[string]any{} err = json.Unmarshal(body, &bodyI) if err != nil { panic(err) } - expectedBodyI := map[string]interface{}{} + expectedBodyI := map[string]any{} err = json.Unmarshal([]byte(expectedBody), &expectedBodyI) if err != nil { panic(err) diff --git a/metricproviders/newrelic/newrelic.go b/metricproviders/newrelic/newrelic.go index eca410b6e7..0c971e5c60 100644 --- a/metricproviders/newrelic/newrelic.go +++ b/metricproviders/newrelic/newrelic.go @@ -78,7 +78,7 @@ func (p *Provider) Run(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric) v1alph return newMeasurement } -func toJSONString(v interface{}) (string, error) { +func toJSONString(v any) (string, error) { b, err := json.Marshal(v) if err != nil { return "", err diff --git a/metricproviders/newrelic/newrelic_test.go b/metricproviders/newrelic/newrelic_test.go index b483d96872..8f49049815 100644 --- a/metricproviders/newrelic/newrelic_test.go +++ b/metricproviders/newrelic/newrelic_test.go @@ -31,7 +31,7 @@ func TestType(t *testing.T) { func TestRunSuccessfully(t *testing.T) { e := log.Entry{} mock := &mockAPI{ - response: []nrdb.NRDBResult{map[string]interface{}{"count": 10}}, + response: []nrdb.NRDBResult{map[string]any{"count": 10}}, } p := NewNewRelicProvider(mock, e) metric := v1alpha1.Metric{ @@ -58,9 +58,9 @@ func TestRunWithTimeseries(t *testing.T) { e := log.NewEntry(log.New()) mock := &mockAPI{ response: []nrdb.NRDBResult{ - map[string]interface{}{"count": 10}, - map[string]interface{}{"count": 20}, - map[string]interface{}{"count": 30}}, + map[string]any{"count": 10}, + map[string]any{"count": 20}, + map[string]any{"count": 30}}, } p := NewNewRelicProvider(mock, *e) metric := v1alpha1.Metric{ @@ -86,7 +86,7 @@ func TestRunWithTimeseries(t *testing.T) { func TestRunWithFacet(t *testing.T) { e := log.NewEntry(log.New()) mock := &mockAPI{ - response: []nrdb.NRDBResult{map[string]interface{}{"count": 10, "average.duration": 12.34}}, + response: []nrdb.NRDBResult{map[string]any{"count": 10, "average.duration": 12.34}}, } p := NewNewRelicProvider(mock, *e) metric := v1alpha1.Metric{ @@ -112,7 +112,7 @@ func TestRunWithFacet(t *testing.T) { func TestRunWithMultipleSelectTerms(t *testing.T) { e := log.NewEntry(log.New()) mock := &mockAPI{ - response: []nrdb.NRDBResult{map[string]interface{}{"count": 10}}, + response: []nrdb.NRDBResult{map[string]any{"count": 10}}, } p := NewNewRelicProvider(mock, *e) metric := v1alpha1.Metric{ @@ -139,7 +139,7 @@ func TestRunWithEmptyResult(t *testing.T) { e := log.NewEntry(log.New()) expectedErr := fmt.Errorf("no results returned from NRQL query") mock := &mockAPI{ - response: []nrdb.NRDBResult{make(map[string]interface{})}, + response: []nrdb.NRDBResult{make(map[string]any)}, } p := NewNewRelicProvider(mock, *e) metric := v1alpha1.Metric{ @@ -245,7 +245,7 @@ func TestRunWithInvalidJSON(t *testing.T) { } t.Run("with a single result map", func(t *testing.T) { mock := &mockAPI{ - response: []nrdb.NRDBResult{map[string]interface{}{"func": func() {}}}, + response: []nrdb.NRDBResult{map[string]any{"func": func() {}}}, } p := NewNewRelicProvider(mock, *e) measurement := p.Run(newAnalysisRun(), metric) @@ -258,7 +258,7 @@ func TestRunWithInvalidJSON(t *testing.T) { t.Run("with multiple results", func(t *testing.T) { // cover branch where results slice is longer than 1 mock := &mockAPI{ - response: []nrdb.NRDBResult{map[string]interface{}{"key": "value"}, map[string]interface{}{"func": func() {}}}, + response: []nrdb.NRDBResult{map[string]any{"key": "value"}, map[string]any{"func": func() {}}}, } p := NewNewRelicProvider(mock, *e) measurement := p.Run(newAnalysisRun(), metric) diff --git a/metricproviders/plugin/rpc/rpc.go b/metricproviders/plugin/rpc/rpc.go index 7f703b5ec9..a709693976 100644 --- a/metricproviders/plugin/rpc/rpc.go +++ b/metricproviders/plugin/rpc/rpc.go @@ -56,7 +56,7 @@ type MetricsPluginRPC struct{ client *rpc.Client } // server side function. func (g *MetricsPluginRPC) InitPlugin() types.RpcError { var resp types.RpcError - err := g.client.Call("Plugin.InitPlugin", new(interface{}), &resp) + err := g.client.Call("Plugin.InitPlugin", new(any), &resp) if err != nil { return types.RpcError{ErrorString: fmt.Sprintf("InitPlugin rpc call error: %s", err)} } @@ -66,7 +66,7 @@ func (g *MetricsPluginRPC) InitPlugin() types.RpcError { // Run is the client side function that is wrapped by a local provider this makes an rpc call to the server side function. func (g *MetricsPluginRPC) Run(analysisRun *v1alpha1.AnalysisRun, metric v1alpha1.Metric) v1alpha1.Measurement { var resp v1alpha1.Measurement - var args interface{} = RunArgs{ + var args any = RunArgs{ AnalysisRun: analysisRun, Metric: metric, } @@ -83,7 +83,7 @@ func (g *MetricsPluginRPC) Run(analysisRun *v1alpha1.AnalysisRun, metric v1alpha // Resume is the client side function that is wrapped by a local provider this makes an rpc call to the server side function. func (g *MetricsPluginRPC) Resume(analysisRun *v1alpha1.AnalysisRun, metric v1alpha1.Metric, measurement v1alpha1.Measurement) v1alpha1.Measurement { var resp v1alpha1.Measurement - var args interface{} = TerminateAndResumeArgs{ + var args any = TerminateAndResumeArgs{ AnalysisRun: analysisRun, Metric: metric, Measurement: measurement, @@ -101,7 +101,7 @@ func (g *MetricsPluginRPC) Resume(analysisRun *v1alpha1.AnalysisRun, metric v1al // Terminate is the client side function that is wrapped by a local provider this makes an rpc call to the server side function. func (g *MetricsPluginRPC) Terminate(analysisRun *v1alpha1.AnalysisRun, metric v1alpha1.Metric, measurement v1alpha1.Measurement) v1alpha1.Measurement { var resp v1alpha1.Measurement - var args interface{} = TerminateAndResumeArgs{ + var args any = TerminateAndResumeArgs{ AnalysisRun: analysisRun, Metric: metric, Measurement: measurement, @@ -119,7 +119,7 @@ func (g *MetricsPluginRPC) Terminate(analysisRun *v1alpha1.AnalysisRun, metric v // GarbageCollect is the client side function that is wrapped by a local provider this makes an rpc call to the server side function. func (g *MetricsPluginRPC) GarbageCollect(analysisRun *v1alpha1.AnalysisRun, metric v1alpha1.Metric, limit int) types.RpcError { var resp types.RpcError - var args interface{} = GarbageCollectArgs{ + var args any = GarbageCollectArgs{ AnalysisRun: analysisRun, Metric: metric, Limit: limit, @@ -134,7 +134,7 @@ func (g *MetricsPluginRPC) GarbageCollect(analysisRun *v1alpha1.AnalysisRun, met // Type is the client side function that is wrapped by a local provider this makes an rpc call to the server side function. func (g *MetricsPluginRPC) Type() string { var resp string - err := g.client.Call("Plugin.Type", new(interface{}), &resp) + err := g.client.Call("Plugin.Type", new(any), &resp) if err != nil { return fmt.Sprintf("Type rpc call error: %s", err) } @@ -144,7 +144,7 @@ func (g *MetricsPluginRPC) Type() string { // GetMetadata is the client side function that is wrapped by a local provider this makes an rpc call to the server side function. func (g *MetricsPluginRPC) GetMetadata(metric v1alpha1.Metric) map[string]string { var resp map[string]string - var args interface{} = GetMetadataArgs{ + var args any = GetMetadataArgs{ Metric: metric, } err := g.client.Call("Plugin.GetMetadata", &args, &resp) @@ -166,14 +166,14 @@ type MetricsRPCServer struct { // InitPlugin is the receiving end of the RPC call running in the plugin executable process (the server), and it calls the // implementation of the plugin. -func (s *MetricsRPCServer) InitPlugin(args interface{}, resp *types.RpcError) error { +func (s *MetricsRPCServer) InitPlugin(args any, resp *types.RpcError) error { *resp = s.Impl.InitPlugin() return nil } // Run is the receiving end of the RPC call running in the plugin executable process (the server), and it calls the // implementation of the plugin. -func (s *MetricsRPCServer) Run(args interface{}, resp *v1alpha1.Measurement) error { +func (s *MetricsRPCServer) Run(args any, resp *v1alpha1.Measurement) error { runArgs, ok := args.(*RunArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -184,7 +184,7 @@ func (s *MetricsRPCServer) Run(args interface{}, resp *v1alpha1.Measurement) err // Resume is the receiving end of the RPC call running in the plugin executable process (the server), and it calls the // implementation of the plugin. -func (s *MetricsRPCServer) Resume(args interface{}, resp *v1alpha1.Measurement) error { +func (s *MetricsRPCServer) Resume(args any, resp *v1alpha1.Measurement) error { resumeArgs, ok := args.(*TerminateAndResumeArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -195,7 +195,7 @@ func (s *MetricsRPCServer) Resume(args interface{}, resp *v1alpha1.Measurement) // Terminate is the receiving end of the RPC call running in the plugin executable process (the server), and it calls the // implementation of the plugin. -func (s *MetricsRPCServer) Terminate(args interface{}, resp *v1alpha1.Measurement) error { +func (s *MetricsRPCServer) Terminate(args any, resp *v1alpha1.Measurement) error { resumeArgs, ok := args.(*TerminateAndResumeArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -206,7 +206,7 @@ func (s *MetricsRPCServer) Terminate(args interface{}, resp *v1alpha1.Measuremen // GarbageCollect is the receiving end of the RPC call running in the plugin executable process (the server), and it calls the // implementation of the plugin. -func (s *MetricsRPCServer) GarbageCollect(args interface{}, resp *types.RpcError) error { +func (s *MetricsRPCServer) GarbageCollect(args any, resp *types.RpcError) error { gcArgs, ok := args.(*GarbageCollectArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -217,14 +217,14 @@ func (s *MetricsRPCServer) GarbageCollect(args interface{}, resp *types.RpcError // Type is the receiving end of the RPC call running in the plugin executable process (the server), and it calls the // implementation of the plugin. -func (s *MetricsRPCServer) Type(args interface{}, resp *string) error { +func (s *MetricsRPCServer) Type(args any, resp *string) error { *resp = s.Impl.Type() return nil } // GetMetadata is the receiving end of the RPC call running in the plugin executable process (the server), and it calls the // implementation of the plugin. -func (s *MetricsRPCServer) GetMetadata(args interface{}, resp *map[string]string) error { +func (s *MetricsRPCServer) GetMetadata(args any, resp *map[string]string) error { getMetadataArgs, ok := args.(*GetMetadataArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -248,10 +248,10 @@ type RpcMetricProviderPlugin struct { Impl MetricProviderPlugin } -func (p *RpcMetricProviderPlugin) Server(*plugin.MuxBroker) (interface{}, error) { +func (p *RpcMetricProviderPlugin) Server(*plugin.MuxBroker) (any, error) { return &MetricsRPCServer{Impl: p.Impl}, nil } -func (RpcMetricProviderPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error) { +func (RpcMetricProviderPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (any, error) { return &MetricsPluginRPC{client: c}, nil } diff --git a/metricproviders/skywalking/mock_test.go b/metricproviders/skywalking/mock_test.go index 70a5b67867..147b172294 100644 --- a/metricproviders/skywalking/mock_test.go +++ b/metricproviders/skywalking/mock_test.go @@ -2,10 +2,10 @@ package skywalking type mockAPI struct { err error - results interface{} + results any } -func (m mockAPI) Query(query string) (interface{}, error) { +func (m mockAPI) Query(query string) (any, error) { if m.err != nil { return m.results, m.err } diff --git a/metricproviders/skywalking/skywalking.go b/metricproviders/skywalking/skywalking.go index eb343b1bdd..4b352100f9 100644 --- a/metricproviders/skywalking/skywalking.go +++ b/metricproviders/skywalking/skywalking.go @@ -29,7 +29,7 @@ const ( ) type SkyWalkingClientAPI interface { - Query(query string) (interface{}, error) + Query(query string) (any, error) } type SkyWalkingClient struct { @@ -38,7 +38,7 @@ type SkyWalkingClient struct { } // Query executes a GraphQL query against the given SkyWalking backend -func (n SkyWalkingClient) Query(query string) (interface{}, error) { +func (n SkyWalkingClient) Query(query string) (any, error) { ctx, cancel := context.WithTimeout(context.Background(), defaultQueryTimeout) defer cancel() @@ -48,7 +48,7 @@ func (n SkyWalkingClient) Query(query string) (interface{}, error) { End: time.Now().Format("2006-01-02 1504"), Step: "MINUTE", }) - var results interface{} + var results any err := n.Run(ctx, req, &results) return results, err } @@ -82,7 +82,7 @@ func (p *Provider) Run(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric) v1alph return newMeasurement } -func toJSONString(v interface{}) (string, error) { +func toJSONString(v any) (string, error) { b, err := json.Marshal(v) if err != nil { return "", err @@ -90,7 +90,7 @@ func toJSONString(v interface{}) (string, error) { return string(b), nil } -func (p *Provider) processResponse(metric v1alpha1.Metric, result interface{}) (string, v1alpha1.AnalysisPhase, error) { +func (p *Provider) processResponse(metric v1alpha1.Metric, result any) (string, v1alpha1.AnalysisPhase, error) { if result == nil { return "", v1alpha1.AnalysisPhaseFailed, fmt.Errorf("no results returned from SkyWalking query") } diff --git a/metricproviders/skywalking/skywalking_test.go b/metricproviders/skywalking/skywalking_test.go index 47c1a60dc9..434def389c 100644 --- a/metricproviders/skywalking/skywalking_test.go +++ b/metricproviders/skywalking/skywalking_test.go @@ -25,7 +25,7 @@ func TestType(t *testing.T) { func TestRunSuccessfully(t *testing.T) { e := log.Entry{} mock := &mockAPI{ - results: map[string]interface{}{"count": 10}, + results: map[string]any{"count": 10}, } p := NewSkyWalkingProvider(mock, e) metric := v1alpha1.Metric{ @@ -51,10 +51,10 @@ func TestRunSuccessfully(t *testing.T) { func TestRunWithTimeseries(t *testing.T) { e := log.NewEntry(log.New()) mock := &mockAPI{ - results: []interface{}{ - map[string]interface{}{"count": 10}, - map[string]interface{}{"count": 20}, - map[string]interface{}{"count": 30}}, + results: []any{ + map[string]any{"count": 10}, + map[string]any{"count": 20}, + map[string]any{"count": 30}}, } p := NewSkyWalkingProvider(mock, *e) metric := v1alpha1.Metric{ @@ -107,7 +107,7 @@ func TestRunWithResolveArgsError(t *testing.T) { expectedErr := fmt.Errorf("failed to resolve {{args.var}}") mock := &mockAPI{ err: expectedErr, - results: map[string]interface{}{"A": "B"}, + results: map[string]any{"A": "B"}, } p := NewSkyWalkingProvider(mock, *e) metric := v1alpha1.Metric{ diff --git a/metricproviders/webmetric/webmetric.go b/metricproviders/webmetric/webmetric.go index e32531f92a..3ec345b90f 100644 --- a/metricproviders/webmetric/webmetric.go +++ b/metricproviders/webmetric/webmetric.go @@ -119,7 +119,7 @@ func (p *Provider) Run(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric) v1alph } func (p *Provider) parseResponse(metric v1alpha1.Metric, response *http.Response) (string, v1alpha1.AnalysisPhase, error) { - var data interface{} + var data any bodyBytes, err := io.ReadAll(response.Body) if err != nil { @@ -145,7 +145,7 @@ func (p *Provider) parseResponse(metric v1alpha1.Metric, response *http.Response return valString, status, err } -func getValue(fullResults [][]reflect.Value) (interface{}, string, error) { +func getValue(fullResults [][]reflect.Value) (any, string, error) { for _, results := range fullResults { for _, r := range results { val := r.Interface() diff --git a/pkg/apis/rollouts/validation/validation_references.go b/pkg/apis/rollouts/validation/validation_references.go index 85040c71c5..f546766b83 100644 --- a/pkg/apis/rollouts/validation/validation_references.go +++ b/pkg/apis/rollouts/validation/validation_references.go @@ -474,7 +474,7 @@ func ValidateAppMeshVirtualRouter(vrouter *unstructured.Unstructured) *field.Err } for idx, routeI := range allRoutesI { routeFldPath := routesFldPath.Index(idx) - route, ok := routeI.(map[string]interface{}) + route, ok := routeI.(map[string]any) if !ok { msg := fmt.Sprintf("Invalid route was found for AppMesh virtual-router %s at index %d", vrouter.GetName(), idx) return field.Invalid(routeFldPath, vrouter.GetName(), msg) diff --git a/pkg/kubectl-argo-rollouts/cmd/create/create.go b/pkg/kubectl-argo-rollouts/cmd/create/create.go index f5dccb4932..a6523d24f7 100644 --- a/pkg/kubectl-argo-rollouts/cmd/create/create.go +++ b/pkg/kubectl-argo-rollouts/cmd/create/create.go @@ -127,7 +127,7 @@ func isJSON(fileBytes []byte) bool { return false } -func unmarshal(fileBytes []byte, obj interface{}) error { +func unmarshal(fileBytes []byte, obj any) error { if isJSON(fileBytes) { decoder := json.NewDecoder(bytes.NewReader(fileBytes)) decoder.DisallowUnknownFields() @@ -143,7 +143,7 @@ func (c *CreateOptions) getNamespace(un unstructured.Unstructured) string { if md == nil { return ns } - metadata := md.(map[string]interface{}) + metadata := md.(map[string]any) if internalns, ok := metadata["namespace"]; ok { ns = internalns.(string) } diff --git a/pkg/kubectl-argo-rollouts/cmd/lint/lint.go b/pkg/kubectl-argo-rollouts/cmd/lint/lint.go index cf1b3cdb36..810abf2c8e 100644 --- a/pkg/kubectl-argo-rollouts/cmd/lint/lint.go +++ b/pkg/kubectl-argo-rollouts/cmd/lint/lint.go @@ -65,7 +65,7 @@ func NewCmdLint(o *options.ArgoRolloutsOptions) *cobra.Command { return cmd } -func unmarshal(fileBytes []byte, obj interface{}) error { +func unmarshal(fileBytes []byte, obj any) error { return yaml.UnmarshalStrict(fileBytes, &obj, yaml.DisallowUnknownFields) } @@ -81,7 +81,7 @@ func (l *LintOptions) lintResource(path string) error { decoder := goyaml.NewDecoder(bytes.NewReader(fileBytes)) for { - var value interface{} + var value any if err := decoder.Decode(&value); err != nil { if err != io.EOF { return err diff --git a/pkg/kubectl-argo-rollouts/cmd/list/list_experiments.go b/pkg/kubectl-argo-rollouts/cmd/list/list_experiments.go index 493a8aaa18..cb83a157fa 100644 --- a/pkg/kubectl-argo-rollouts/cmd/list/list_experiments.go +++ b/pkg/kubectl-argo-rollouts/cmd/list/list_experiments.go @@ -99,7 +99,7 @@ func (o *ListOptions) PrintExperimentTable(expList *v1alpha1.ExperimentList) err } } } - var cols []interface{} + var cols []any if o.allNamespaces { cols = append(cols, exp.Namespace) } diff --git a/pkg/kubectl-argo-rollouts/cmd/list/rollloutinfo.go b/pkg/kubectl-argo-rollouts/cmd/list/rollloutinfo.go index d015939f69..a797e35f1d 100644 --- a/pkg/kubectl-argo-rollouts/cmd/list/rollloutinfo.go +++ b/pkg/kubectl-argo-rollouts/cmd/list/rollloutinfo.go @@ -86,15 +86,15 @@ func (ri *rolloutInfo) key() infoKey { func (ri *rolloutInfo) String(timestamp, namespace bool) string { fmtString := columnFmtString - args := []interface{}{ri.name, ri.strategy, ri.status, ri.step, ri.setWeight, ri.readyCurrent, ri.desired, ri.upToDate, ri.available} + args := []any{ri.name, ri.strategy, ri.status, ri.step, ri.setWeight, ri.readyCurrent, ri.desired, ri.upToDate, ri.available} if namespace { fmtString = "%-9s\t" + fmtString - args = append([]interface{}{ri.namespace}, args...) + args = append([]any{ri.namespace}, args...) } if timestamp { fmtString = "%-20s\t" + fmtString timestampStr := timeutil.Now().UTC().Truncate(time.Second).Format("2006-01-02T15:04:05Z") - args = append([]interface{}{timestampStr}, args...) + args = append([]any{timestampStr}, args...) } return fmt.Sprintf(fmtString, args...) } diff --git a/pkg/kubectl-argo-rollouts/cmd/set/set_image.go b/pkg/kubectl-argo-rollouts/cmd/set/set_image.go index 45ed6faac9..1a5b5dce24 100644 --- a/pkg/kubectl-argo-rollouts/cmd/set/set_image.go +++ b/pkg/kubectl-argo-rollouts/cmd/set/set_image.go @@ -124,9 +124,9 @@ func newRolloutSetImage(orig *unstructured.Unstructured, container string, image if !ok { continue } - ctrList := ctrListIf.([]interface{}) + ctrList := ctrListIf.([]any) for _, ctrIf := range ctrList { - ctr := ctrIf.(map[string]interface{}) + ctr := ctrIf.(map[string]any) if name, _, _ := unstructured.NestedString(ctr, "name"); name == container || container == "*" { ctr["image"] = image containerFound = true diff --git a/pkg/kubectl-argo-rollouts/cmd/undo/undo.go b/pkg/kubectl-argo-rollouts/cmd/undo/undo.go index a282757b16..d3a78d15f2 100644 --- a/pkg/kubectl-argo-rollouts/cmd/undo/undo.go +++ b/pkg/kubectl-argo-rollouts/cmd/undo/undo.go @@ -176,8 +176,8 @@ func rolloutRevision(ro *unstructured.Unstructured, c kubernetes.Interface, toRe } func getRolloutPatch(podTemplate *corev1.PodTemplateSpec, annotations map[string]string) (types.PatchType, []byte, error) { - patch, err := json.Marshal([]interface{}{ - map[string]interface{}{ + patch, err := json.Marshal([]any{ + map[string]any{ "op": "replace", "path": "/spec/template", "value": podTemplate, @@ -235,12 +235,12 @@ func listReplicaSets(ro *unstructured.Unstructured, getRSList rsListFunc) ([]*ap return owned, nil } -func extractLabelSelector(v map[string]interface{}) (*metav1.LabelSelector, error) { +func extractLabelSelector(v map[string]any) (*metav1.LabelSelector, error) { labels, _, _ := unstructured.NestedStringMap(v, "spec", "selector", "matchLabels") items, _, _ := unstructured.NestedSlice(v, "spec", "selector", "matchExpressions") matchExpressions := []metav1.LabelSelectorRequirement{} for _, item := range items { - m, ok := item.(map[string]interface{}) + m, ok := item.(map[string]any) if !ok { return nil, fmt.Errorf("unable to retrieve matchExpressions for object, item %v is not a map", item) } diff --git a/pkg/kubectl-argo-rollouts/viewcontroller/viewcontroller.go b/pkg/kubectl-argo-rollouts/viewcontroller/viewcontroller.go index 157f148d5f..4aafb0a32a 100644 --- a/pkg/kubectl-argo-rollouts/viewcontroller/viewcontroller.go +++ b/pkg/kubectl-argo-rollouts/viewcontroller/viewcontroller.go @@ -45,9 +45,9 @@ type viewController struct { cacheSyncs []cache.InformerSynced workqueue workqueue.RateLimitingInterface - prevObj interface{} - getObj func() (interface{}, error) - callbacks []func(interface{}) + prevObj any + getObj func() (any, error) + callbacks []func(any) } type RolloutViewController struct { @@ -71,7 +71,7 @@ func NewRolloutViewController(namespace string, name string, kubeClient kubernet rvc := RolloutViewController{ viewController: vc, } - vc.getObj = func() (interface{}, error) { + vc.getObj = func() (any, error) { return rvc.GetRolloutInfo() } return &rvc @@ -82,7 +82,7 @@ func NewExperimentViewController(namespace string, name string, kubeClient kuber evc := ExperimentViewController{ viewController: vc, } - vc.getObj = func() (interface{}, error) { + vc.getObj = func() (any, error) { return evc.GetExperimentInfo() } return &evc @@ -114,13 +114,13 @@ func newViewController(namespace string, name string, kubeClient kubernetes.Inte ) enqueueRolloutHandlerFuncs := cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { controller.workqueue.Add(controller.name) }, - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { controller.workqueue.Add(controller.name) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { controller.workqueue.Add(controller.name) }, } @@ -215,7 +215,7 @@ func (c *RolloutViewController) GetRolloutInfo() (*rollout.RolloutInfo, error) { } func (c *RolloutViewController) RegisterCallback(callback RolloutInfoCallback) { - cb := func(i interface{}) { + cb := func(i any) { callback(i.(*rollout.RolloutInfo)) } c.callbacks = append(c.callbacks, cb) @@ -243,7 +243,7 @@ func (c *ExperimentViewController) GetExperimentInfo() (*rollout.ExperimentInfo, } func (c *ExperimentViewController) RegisterCallback(callback ExperimentInfoCallback) { - cb := func(i interface{}) { + cb := func(i any) { callback(i.(*rollout.ExperimentInfo)) } c.callbacks = append(c.callbacks, cb) diff --git a/rollout/canary_test.go b/rollout/canary_test.go index 9f66cf1078..e3bffff2dd 100644 --- a/rollout/canary_test.go +++ b/rollout/canary_test.go @@ -1467,7 +1467,7 @@ func TestCanaryRolloutWithInvalidCanaryServiceName(t *testing.T) { patchIndex := f.expectPatchRolloutAction(rollout) f.run(getKey(rollout, t)) - patch := make(map[string]interface{}) + patch := make(map[string]any) patchData := f.getPatchedRollout(patchIndex) err := json.Unmarshal([]byte(patchData), &patch) assert.NoError(t, err) @@ -1477,7 +1477,7 @@ func TestCanaryRolloutWithInvalidCanaryServiceName(t *testing.T) { assert.True(t, ok) assert.Len(t, c, 2) - condition, ok := c[1].(map[string]interface{}) + condition, ok := c[1].(map[string]any) assert.True(t, ok) assert.Equal(t, conditions.InvalidSpecReason, condition["reason"]) assert.Equal(t, "The Rollout \"foo\" is invalid: spec.strategy.canary.canaryService: Invalid value: \"invalid-canary\": service \"invalid-canary\" not found", condition["message"]) @@ -1519,7 +1519,7 @@ func TestCanaryRolloutWithInvalidStableServiceName(t *testing.T) { patchIndex := f.expectPatchRolloutAction(rollout) f.run(getKey(rollout, t)) - patch := make(map[string]interface{}) + patch := make(map[string]any) patchData := f.getPatchedRollout(patchIndex) err := json.Unmarshal([]byte(patchData), &patch) assert.NoError(t, err) @@ -1529,7 +1529,7 @@ func TestCanaryRolloutWithInvalidStableServiceName(t *testing.T) { assert.True(t, ok) assert.Len(t, c, 2) - condition, ok := c[1].(map[string]interface{}) + condition, ok := c[1].(map[string]any) assert.True(t, ok) assert.Equal(t, conditions.InvalidSpecReason, condition["reason"]) assert.Equal(t, "The Rollout \"foo\" is invalid: spec.strategy.canary.stableService: Invalid value: \"invalid-stable\": service \"invalid-stable\" not found", condition["message"]) @@ -1570,7 +1570,7 @@ func TestCanaryRolloutWithInvalidPingServiceName(t *testing.T) { patchIndex := f.expectPatchRolloutAction(r) f.run(getKey(r, t)) - patch := make(map[string]interface{}) + patch := make(map[string]any) patchData := f.getPatchedRollout(patchIndex) err := json.Unmarshal([]byte(patchData), &patch) assert.NoError(t, err) @@ -1580,7 +1580,7 @@ func TestCanaryRolloutWithInvalidPingServiceName(t *testing.T) { assert.True(t, ok) assert.Len(t, c, 2) - condition, ok := c[1].(map[string]interface{}) + condition, ok := c[1].(map[string]any) assert.True(t, ok) assert.Equal(t, conditions.InvalidSpecReason, condition["reason"]) assert.Equal(t, "The Rollout \"foo\" is invalid: spec.strategy.canary.pingPong.pingService: Invalid value: \"ping-service\": service \"ping-service\" not found", condition["message"]) @@ -1602,7 +1602,7 @@ func TestCanaryRolloutWithInvalidPongServiceName(t *testing.T) { patchIndex := f.expectPatchRolloutAction(r) f.run(getKey(r, t)) - patch := make(map[string]interface{}) + patch := make(map[string]any) patchData := f.getPatchedRollout(patchIndex) err := json.Unmarshal([]byte(patchData), &patch) assert.NoError(t, err) @@ -1612,7 +1612,7 @@ func TestCanaryRolloutWithInvalidPongServiceName(t *testing.T) { assert.True(t, ok) assert.Len(t, c, 2) - condition, ok := c[1].(map[string]interface{}) + condition, ok := c[1].(map[string]any) assert.True(t, ok) assert.Equal(t, conditions.InvalidSpecReason, condition["reason"]) assert.Equal(t, "The Rollout \"foo\" is invalid: spec.strategy.canary.pingPong.pongService: Invalid value: \"pong-service\": service \"pong-service\" not found", condition["message"]) @@ -1698,11 +1698,11 @@ func TestResumeRolloutAfterPauseDuration(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - var patchObj map[string]interface{} + var patchObj map[string]any err := json.Unmarshal([]byte(patch), &patchObj) assert.NoError(t, err) - status := patchObj["status"].(map[string]interface{}) + status := patchObj["status"].(map[string]any) assert.Equal(t, float64(2), status["currentStepIndex"]) controllerPause, ok := status["controllerPause"] assert.True(t, ok) diff --git a/rollout/controller.go b/rollout/controller.go index b5c51914ae..5824512271 100644 --- a/rollout/controller.go +++ b/rollout/controller.go @@ -144,8 +144,8 @@ type reconcilerBase struct { podRestarter RolloutPodRestarter // used for unit testing - enqueueRollout func(obj interface{}) //nolint:structcheck - enqueueRolloutAfter func(obj interface{}, duration time.Duration) //nolint:structcheck + enqueueRollout func(obj any) //nolint:structcheck + enqueueRolloutAfter func(obj any, duration time.Duration) //nolint:structcheck newTrafficRoutingReconciler func(roCtx *rolloutContext) ([]trafficrouting.TrafficRoutingReconciler, error) //nolint:structcheck // recorder is an event recorder for recording Event resources to the Kubernetes API. @@ -171,7 +171,7 @@ func NewController(cfg ControllerConfig) *Controller { podRestarter := RolloutPodRestarter{ client: cfg.KubeClientSet, resyncPeriod: cfg.ResyncPeriod, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { controllerutil.EnqueueAfter(obj, duration, cfg.RolloutWorkQueue) }, } @@ -208,10 +208,10 @@ func NewController(cfg ControllerConfig) *Controller { ingressWorkqueue: cfg.IngressWorkQueue, metricsServer: cfg.MetricsServer, } - controller.enqueueRollout = func(obj interface{}) { + controller.enqueueRollout = func(obj any) { controllerutil.EnqueueRateLimited(obj, cfg.RolloutWorkQueue) } - controller.enqueueRolloutAfter = func(obj interface{}, duration time.Duration) { + controller.enqueueRolloutAfter = func(obj any, duration time.Duration) { controllerutil.EnqueueAfter(obj, duration, cfg.RolloutWorkQueue) } @@ -228,7 +228,7 @@ func NewController(cfg ControllerConfig) *Controller { log.Info("Setting up event handlers") // Set up an event handler for when rollout resources change cfg.RolloutsInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { controller.enqueueRollout(obj) ro := unstructuredutil.ObjectToRollout(obj) if ro != nil { @@ -242,7 +242,7 @@ func NewController(cfg ControllerConfig) *Controller { } } }, - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { oldRollout := unstructuredutil.ObjectToRollout(old) newRollout := unstructuredutil.ObjectToRollout(new) if oldRollout != nil && newRollout != nil { @@ -258,7 +258,7 @@ func NewController(cfg ControllerConfig) *Controller { } controller.enqueueRollout(new) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { if ro := unstructuredutil.ObjectToRollout(obj); ro != nil { logCtx := logutil.WithRollout(ro) logCtx.Info("rollout deleted") @@ -277,10 +277,10 @@ func NewController(cfg ControllerConfig) *Controller { }) cfg.ReplicaSetInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { controllerutil.EnqueueParentObject(obj, register.RolloutKind, controller.enqueueRollout) }, - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { newRS := new.(*appsv1.ReplicaSet) oldRS := old.(*appsv1.ReplicaSet) if newRS.ResourceVersion == oldRS.ResourceVersion { @@ -290,16 +290,16 @@ func NewController(cfg ControllerConfig) *Controller { } controllerutil.EnqueueParentObject(new, register.RolloutKind, controller.enqueueRollout) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { controllerutil.EnqueueParentObject(obj, register.RolloutKind, controller.enqueueRollout) }, }) cfg.AnalysisRunInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { controllerutil.EnqueueParentObject(obj, register.RolloutKind, controller.enqueueRollout) }, - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { oldAR := unstructuredutil.ObjectToAnalysisRun(old) newAR := unstructuredutil.ObjectToAnalysisRun(new) if oldAR == nil || newAR == nil { @@ -311,7 +311,7 @@ func NewController(cfg ControllerConfig) *Controller { } controllerutil.EnqueueParentObject(new, register.RolloutKind, controller.enqueueRollout) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { controllerutil.EnqueueParentObject(obj, register.RolloutKind, controller.enqueueRollout) }, }) @@ -884,7 +884,7 @@ func (c *rolloutContext) getReferencedALBIngresses(canary *v1alpha1.CanaryStrate return &ingresses, nil } -func handleCacheError(name string, childFields []string, value interface{}, err error) (*[]ingressutil.Ingress, error) { +func handleCacheError(name string, childFields []string, value any, err error) (*[]ingressutil.Ingress, error) { if k8serrors.IsNotFound(err) { fldPath := field.NewPath("spec", "strategy", "canary", "trafficRouting") return nil, field.Invalid(fldPath.Child(name, childFields...), value, err.Error()) diff --git a/rollout/controller_test.go b/rollout/controller_test.go index d2c78d70c1..d37cdc24cd 100644 --- a/rollout/controller_test.go +++ b/rollout/controller_test.go @@ -494,12 +494,12 @@ func calculatePatch(ro *v1alpha1.Rollout, patch string) string { json.Unmarshal(newBytes, newRO) newObservedGen := strconv.Itoa(int(newRO.Generation)) - newPatch := make(map[string]interface{}) + newPatch := make(map[string]any) err = json.Unmarshal([]byte(patch), &newPatch) if err != nil { panic(err) } - newStatus := newPatch["status"].(map[string]interface{}) + newStatus := newPatch["status"].(map[string]any) newStatus["observedGeneration"] = newObservedGen newPatch["status"] = newStatus newPatchBytes, _ := json.Marshal(newPatch) @@ -507,7 +507,7 @@ func calculatePatch(ro *v1alpha1.Rollout, patch string) string { } func cleanPatch(expectedPatch string) string { - patch := make(map[string]interface{}) + patch := make(map[string]any) err := json.Unmarshal([]byte(expectedPatch), &patch) if err != nil { panic(err) @@ -599,7 +599,7 @@ func (f *fixture) newController(resync resyncFunc) (*Controller, informers.Share }) var enqueuedObjectsLock sync.Mutex - c.enqueueRollout = func(obj interface{}) { + c.enqueueRollout = func(obj any) { var key string var err error if key, err = cache.MetaNamespaceKeyFunc(obj); err != nil { @@ -615,7 +615,7 @@ func (f *fixture) newController(resync resyncFunc) (*Controller, informers.Share f.enqueuedObjects[key] = count c.rolloutWorkqueue.Add(obj) } - c.enqueueRolloutAfter = func(obj interface{}, duration time.Duration) { + c.enqueueRolloutAfter = func(obj any, duration time.Duration) { c.enqueueRollout(obj) } c.newTrafficRoutingReconciler = func(roCtx *rolloutContext) ([]trafficrouting.TrafficRoutingReconciler, error) { @@ -1078,7 +1078,7 @@ func (f *fixture) getPatchedRolloutWithoutConditions(index int) string { if !ok { f.t.Fatalf("Expected Patch action, not %s", action.GetVerb()) } - ro := make(map[string]interface{}) + ro := make(map[string]any) err := json.Unmarshal(patchAction.GetPatch(), &ro) if err != nil { f.t.Fatalf("Unable to unmarshal Patch") diff --git a/rollout/replicaset_test.go b/rollout/replicaset_test.go index b1588ff4ce..26b05b5b54 100644 --- a/rollout/replicaset_test.go +++ b/rollout/replicaset_test.go @@ -210,7 +210,7 @@ func TestReconcileNewReplicaSet(t *testing.T) { rollout: rollout, }, } - roCtx.enqueueRolloutAfter = func(obj interface{}, duration time.Duration) {} + roCtx.enqueueRolloutAfter = func(obj any, duration time.Duration) {} if test.abortScaleDownDelaySeconds > 0 { rollout.Status.Abort = true rollout.Spec.Strategy = v1alpha1.RolloutStrategy{ diff --git a/rollout/restart.go b/rollout/restart.go index a8361bf24f..95f9a97076 100644 --- a/rollout/restart.go +++ b/rollout/restart.go @@ -36,7 +36,7 @@ const ( type RolloutPodRestarter struct { client kubernetes.Interface resyncPeriod time.Duration - enqueueAfter func(obj interface{}, duration time.Duration) + enqueueAfter func(obj any, duration time.Duration) } // checkEnqueueRollout enqueues a Rollout if the Rollout's restartedAt is within the next resync diff --git a/rollout/restart_test.go b/rollout/restart_test.go index 84374a37a4..a6a20b4188 100644 --- a/rollout/restart_test.go +++ b/rollout/restart_test.go @@ -94,7 +94,7 @@ func TestRestartCheckEnqueueRollout(t *testing.T) { log: logrus.WithField("", ""), } p := RolloutPodRestarter{ - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { assert.Fail(t, "Should not enqueue rollout") }, } @@ -108,7 +108,7 @@ func TestRestartCheckEnqueueRollout(t *testing.T) { } p := RolloutPodRestarter{ resyncPeriod: 10 * time.Minute, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { assert.Fail(t, "Should not enqueue rollout") }, } @@ -123,7 +123,7 @@ func TestRestartCheckEnqueueRollout(t *testing.T) { } p := RolloutPodRestarter{ resyncPeriod: 10 * time.Minute, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { enqueued = true }, } @@ -139,7 +139,7 @@ func TestRestartCheckEnqueueRollout(t *testing.T) { } p := RolloutPodRestarter{ resyncPeriod: 2 * time.Minute, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { enqueued = true }, } @@ -182,7 +182,7 @@ func TestRestartReconcile(t *testing.T) { r := RolloutPodRestarter{ client: client, resyncPeriod: 2 * time.Minute, - enqueueAfter: func(obj interface{}, duration time.Duration) {}, + enqueueAfter: func(obj any, duration time.Duration) {}, } err := r.Reconcile(roCtx) assert.Nil(t, err) @@ -203,7 +203,7 @@ func TestRestartReconcile(t *testing.T) { }) r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) {}, + enqueueAfter: func(obj any, duration time.Duration) {}, } err := r.Reconcile(roCtx) assert.Errorf(t, err, expectedErrMsg) @@ -217,7 +217,7 @@ func TestRestartReconcile(t *testing.T) { } r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) {}, + enqueueAfter: func(obj any, duration time.Duration) {}, } err := r.Reconcile(roCtx) assert.Nil(t, err) @@ -235,7 +235,7 @@ func TestRestartReconcile(t *testing.T) { } r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) {}, + enqueueAfter: func(obj any, duration time.Duration) {}, } err := r.Reconcile(roCtx) assert.Nil(t, err) @@ -252,7 +252,7 @@ func TestRestartReconcile(t *testing.T) { } r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) {}, + enqueueAfter: func(obj any, duration time.Duration) {}, } err := r.Reconcile(roCtx) assert.Nil(t, err) @@ -469,7 +469,7 @@ func TestRestartMaxUnavailable(t *testing.T) { enqueued := false r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { enqueued = true }, } @@ -497,7 +497,7 @@ func TestRestartMaxUnavailable(t *testing.T) { enqueued := false r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { enqueued = true }, } @@ -525,7 +525,7 @@ func TestRestartMaxUnavailable(t *testing.T) { enqueued := false r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { enqueued = true }, } @@ -558,7 +558,7 @@ func TestRestartMaxUnavailable(t *testing.T) { enqueued := false r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { enqueued = true }, } @@ -592,7 +592,7 @@ func TestRestartMaxUnavailable(t *testing.T) { enqueued := false r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { enqueued = true }, } @@ -618,7 +618,7 @@ func TestRestartMaxUnavailable(t *testing.T) { enqueued := false r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { enqueued = true }, } @@ -650,7 +650,7 @@ func TestRestartRespectPodDisruptionBudget(t *testing.T) { enqueueCalled := false r := RolloutPodRestarter{ client: client, - enqueueAfter: func(obj interface{}, duration time.Duration) { + enqueueAfter: func(obj any, duration time.Duration) { enqueueCalled = true }, } diff --git a/rollout/templateref.go b/rollout/templateref.go index a8faf92b8b..15dab6a27d 100644 --- a/rollout/templateref.go +++ b/rollout/templateref.go @@ -75,7 +75,7 @@ func NewInformerBasedWorkloadRefResolver( ) *informerBasedTemplateResolver { ctx, cancelContext := context.WithCancel(context.TODO()) err := rolloutsInformer.AddIndexers(cache.Indexers{ - templateRefIndexName: func(obj interface{}) ([]string, error) { + templateRefIndexName: func(obj any) ([]string, error) { if ro := unstructuredutil.ObjectToRollout(obj); ro != nil && ro.Spec.WorkloadRef != nil { return []string{refKey(*ro.Spec.WorkloadRef, ro.Namespace)}, nil } @@ -115,7 +115,7 @@ func (r *informerBasedTemplateResolver) Stop() { r.cancelContext = cancelContext } -func remarshalMap(objMap map[string]interface{}, res interface{}) error { +func remarshalMap(objMap map[string]any, res any) error { data, err := json.Marshal(objMap) if err != nil { return err @@ -210,13 +210,13 @@ func (r *informerBasedTemplateResolver) newInformerForGVK(gvk schema.GroupVersio cache.Indexers{}, nil) informer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { r.updateRolloutsReferenceAnnotation(obj, gvk) }, - UpdateFunc: func(oldObj, newObj interface{}) { + UpdateFunc: func(oldObj, newObj any) { r.updateRolloutsReferenceAnnotation(newObj, gvk) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { r.updateRolloutsReferenceAnnotation(obj, gvk) }, }) @@ -225,7 +225,7 @@ func (r *informerBasedTemplateResolver) newInformerForGVK(gvk schema.GroupVersio } // updateRolloutsReferenceAnnotation update the annotation of all rollouts referenced by given object -func (r *informerBasedTemplateResolver) updateRolloutsReferenceAnnotation(obj interface{}, gvk schema.GroupVersionKind) { +func (r *informerBasedTemplateResolver) updateRolloutsReferenceAnnotation(obj any, gvk schema.GroupVersionKind) { workloadMeta, err := meta.Accessor(obj) if err != nil { return @@ -247,9 +247,9 @@ func (r *informerBasedTemplateResolver) updateRolloutsReferenceAnnotation(obj in updated := annotations.SetRolloutWorkloadRefGeneration(ro, generation) if updated { - patch := map[string]interface{}{ - "metadata": map[string]interface{}{ - "annotations": map[string]interface{}{ + patch := map[string]any{ + "metadata": map[string]any{ + "annotations": map[string]any{ annotations.WorkloadGenerationAnnotation: ro.Annotations[annotations.WorkloadGenerationAnnotation], }, }, diff --git a/rollout/trafficrouting/apisix/apisix.go b/rollout/trafficrouting/apisix/apisix.go index 1147721a39..6269cc698e 100644 --- a/rollout/trafficrouting/apisix/apisix.go +++ b/rollout/trafficrouting/apisix/apisix.go @@ -91,7 +91,7 @@ func (r *Reconciler) SetWeight(desiredWeight int32, additionalDestinations ...v1 return err } -func (r *Reconciler) processSetWeightRoutes(desiredWeight int32, apisixRoute *unstructured.Unstructured, rollout *v1alpha1.Rollout, apisixRouteName string) ([]interface{}, error) { +func (r *Reconciler) processSetWeightRoutes(desiredWeight int32, apisixRoute *unstructured.Unstructured, rollout *v1alpha1.Rollout, apisixRouteName string) ([]any, error) { httpRoutes, isFound, err := unstructured.NestedSlice(apisixRoute.Object, "spec", "http") if err != nil { return nil, err @@ -129,9 +129,9 @@ func (r *Reconciler) processSetWeightRoutes(desiredWeight int32, apisixRoute *un return httpRoutes, nil } -func GetHttpRoute(routes []interface{}, ref string) (interface{}, error) { +func GetHttpRoute(routes []any, ref string) (any, error) { for _, route := range routes { - typedRoute, ok := route.(map[string]interface{}) + typedRoute, ok := route.(map[string]any) if !ok { return nil, errors.New(failedToTypeAssertion) } @@ -151,8 +151,8 @@ func GetHttpRoute(routes []interface{}, ref string) (interface{}, error) { return nil, errors.New(fmt.Sprintf("Apisix http route rule %s not found", ref)) } -func GetBackends(httpRoute interface{}) ([]interface{}, error) { - typedHttpRoute, ok := httpRoute.(map[string]interface{}) +func GetBackends(httpRoute any) ([]any, error) { + typedHttpRoute, ok := httpRoute.(map[string]any) if !ok { return nil, errors.New(failedToTypeAssertion) } @@ -160,17 +160,17 @@ func GetBackends(httpRoute interface{}) ([]interface{}, error) { if !ok { return nil, errors.New("Apisix http route backends not found") } - backends, ok := rawBackends.([]interface{}) + backends, ok := rawBackends.([]any) if !ok { return nil, errors.New(fmt.Sprintf("%s backends", failedToTypeAssertion)) } return backends, nil } -func setBackendWeight(backendName string, backends []interface{}, weight int64) error { +func setBackendWeight(backendName string, backends []any, weight int64) error { found := false for _, backend := range backends { - typedBackend, ok := backend.(map[string]interface{}) + typedBackend, ok := backend.(map[string]any) if !ok { return errors.New(fmt.Sprintf("%s backends", failedToTypeAssertion)) } @@ -323,14 +323,14 @@ func (r *Reconciler) makeSetHeaderRoute(ctx context.Context, headerRouting *v1al return setHeaderApisixRoute, isNew, nil } -func removeBackend(route interface{}, backendName string, backends []interface{}) error { - typedRoute, ok := route.(map[string]interface{}) +func removeBackend(route any, backendName string, backends []any) error { + typedRoute, ok := route.(map[string]any) if !ok { return errors.New("Failed type assertion for Apisix http route") } - result := []interface{}{} + result := []any{} for _, backend := range backends { - typedBackend, ok := backend.(map[string]interface{}) + typedBackend, ok := backend.(map[string]any) if !ok { return errors.New("Failed type assertion for Apisix http route backend") } @@ -348,8 +348,8 @@ func removeBackend(route interface{}, backendName string, backends []interface{} return unstructured.SetNestedSlice(typedRoute, result, "backends") } -func processRulePriority(route interface{}) error { - typedRoute, ok := route.(map[string]interface{}) +func processRulePriority(route any) error { + typedRoute, ok := route.(map[string]any) if !ok { return errors.New("Failed type assertion for Apisix http route") } @@ -366,40 +366,40 @@ func processRulePriority(route interface{}) error { return nil } -func setApisixRuleMatch(route interface{}, headerRouting *v1alpha1.SetHeaderRoute) error { - typedRoute, ok := route.(map[string]interface{}) +func setApisixRuleMatch(route any, headerRouting *v1alpha1.SetHeaderRoute) error { + typedRoute, ok := route.(map[string]any) if !ok { return errors.New("Failed type assertion for Apisix http route") } - exprs := []interface{}{} + exprs := []any{} for _, match := range headerRouting.Match { exprs = append(exprs, apisixExprs(match.HeaderName, match.HeaderValue.Exact, match.HeaderValue.Regex, match.HeaderValue.Prefix)...) } return unstructured.SetNestedSlice(typedRoute, exprs, "match", "exprs") } -func apisixExprs(header, exact, regex, prefix string) []interface{} { - subject := map[string]interface{}{ +func apisixExprs(header, exact, regex, prefix string) []any { + subject := map[string]any{ "scope": "Header", "name": header, } - exprs := []interface{}{} + exprs := []any{} if exact != "" { - exprs = append(exprs, map[string]interface{}{ + exprs = append(exprs, map[string]any{ "subject": subject, "op": "Equal", "value": exact, }) } if regex != "" { - exprs = append(exprs, map[string]interface{}{ + exprs = append(exprs, map[string]any{ "subject": subject, "op": "RegexMatch", "value": regex, }) } if prefix != "" { - exprs = append(exprs, map[string]interface{}{ + exprs = append(exprs, map[string]any{ "subject": subject, "op": "RegexMatch", "value": fmt.Sprintf("^%s.*", prefix), diff --git a/rollout/trafficrouting/apisix/apisix_test.go b/rollout/trafficrouting/apisix/apisix_test.go index 9fcf4ff394..823e3bfb10 100644 --- a/rollout/trafficrouting/apisix/apisix_test.go +++ b/rollout/trafficrouting/apisix/apisix_test.go @@ -172,7 +172,7 @@ func TestSetWeight(t *testing.T) { backends, err := GetBackends(apisixHttpRouteObj) assert.NoError(t, err) for _, backend := range backends { - typedBackend, ok := backend.(map[string]interface{}) + typedBackend, ok := backend.(map[string]any) assert.Equal(t, ok, true) nameOfCurrentBackend, isFound, err := unstructured.NestedString(typedBackend, "serviceName") assert.NoError(t, err) @@ -279,7 +279,7 @@ func TestSetWeight(t *testing.T) { func TestGetHttpRouteError(t *testing.T) { type testcase struct { - routes []interface{} + routes []any ref string } testcases := []testcase{ @@ -288,28 +288,28 @@ func TestGetHttpRouteError(t *testing.T) { ref: "nil", }, { - routes: []interface{}{""}, + routes: []any{""}, ref: "Failed type", }, { - routes: []interface{}{ - map[string]interface{}{ + routes: []any{ + map[string]any{ "x": nil, }, }, ref: "noname", }, { - routes: []interface{}{ - map[string]interface{}{ + routes: []any{ + map[string]any{ "name": 123, }, }, ref: "name type error", }, { - routes: []interface{}{ - map[string]interface{}{ + routes: []any{ + map[string]any{ "name": "123", }, }, @@ -324,11 +324,11 @@ func TestGetHttpRouteError(t *testing.T) { } func TestGetBackendsError(t *testing.T) { - testcases := []interface{}{ + testcases := []any{ nil, 123, - map[string]interface{}{}, - map[string]interface{}{ + map[string]any{}, + map[string]any{ "backends": "123", }, } @@ -342,26 +342,26 @@ func TestGetBackendsError(t *testing.T) { func TestSetBackendWeightError(t *testing.T) { type testcase struct { backendName string - backends []interface{} + backends []any weight int64 } testcases := []testcase{ {}, { - backends: []interface{}{ + backends: []any{ "", }, }, { - backends: []interface{}{ - map[string]interface{}{ + backends: []any{ + map[string]any{ "abc": 123, }, }, }, { - backends: []interface{}{ - map[string]interface{}{ + backends: []any{ + map[string]any{ "serviceName": 123, }, }, @@ -512,7 +512,7 @@ func TestSetHeaderRoute(t *testing.T) { assert.NoError(t, err) assert.Equal(t, true, ok) - rule, ok := rules[0].(map[string]interface{}) + rule, ok := rules[0].(map[string]any) assert.Equal(t, true, ok) priority, ok, err := unstructured.NestedInt64(rule, "priority") assert.NoError(t, err) @@ -548,7 +548,7 @@ func TestSetHeaderRoute(t *testing.T) { assert.NoError(t, err) assert.Equal(t, true, ok) - rule, ok := rules[0].(map[string]interface{}) + rule, ok := rules[0].(map[string]any) assert.Equal(t, true, ok) priority, ok, err := unstructured.NestedInt64(rule, "priority") assert.NoError(t, err) @@ -597,7 +597,7 @@ func TestSetHeaderRoute(t *testing.T) { assert.NoError(t, err) assert.Equal(t, true, ok) - rule, ok := rules[0].(map[string]interface{}) + rule, ok := rules[0].(map[string]any) assert.Equal(t, true, ok) exprs, ok, err := unstructured.NestedSlice(rule, "match", "exprs") assert.NoError(t, err) @@ -652,7 +652,7 @@ func TestSetHeaderRoute(t *testing.T) { assert.NoError(t, err) assert.Equal(t, true, ok) - rule, ok := rules[0].(map[string]interface{}) + rule, ok := rules[0].(map[string]any) assert.Equal(t, true, ok) exprs, ok, err := unstructured.NestedSlice(rule, "match", "exprs") assert.NoError(t, err) @@ -765,11 +765,11 @@ func TestSetHeaderRoute(t *testing.T) { }) } -func assertExpr(t *testing.T, expr interface{}, op, name, scope, value string) { +func assertExpr(t *testing.T, expr any, op, name, scope, value string) { if expr == nil { assert.Error(t, errors.New("expr is nil")) } - typedExpr, ok := expr.(map[string]interface{}) + typedExpr, ok := expr.(map[string]any) assert.Equal(t, true, ok) opAct, ok, err := unstructured.NestedString(typedExpr, "op") diff --git a/rollout/trafficrouting/apisix/mocks/apisix.go b/rollout/trafficrouting/apisix/mocks/apisix.go index c884167412..2bba83c499 100644 --- a/rollout/trafficrouting/apisix/mocks/apisix.go +++ b/rollout/trafficrouting/apisix/mocks/apisix.go @@ -45,10 +45,10 @@ var ( ErrorApisixRouteObj *unstructured.Unstructured ) -func (f *FakeRecorder) Eventf(object runtime.Object, opts argoRecord.EventOptions, messageFmt string, args ...interface{}) { +func (f *FakeRecorder) Eventf(object runtime.Object, opts argoRecord.EventOptions, messageFmt string, args ...any) { } -func (f *FakeRecorder) Warnf(object runtime.Object, opts argoRecord.EventOptions, messageFmt string, args ...interface{}) { +func (f *FakeRecorder) Warnf(object runtime.Object, opts argoRecord.EventOptions, messageFmt string, args ...any) { } func (f *FakeRecorder) K8sRecorder() record.EventRecorder { diff --git a/rollout/trafficrouting/appmesh/appmesh.go b/rollout/trafficrouting/appmesh/appmesh.go index f0528f779a..6272571111 100644 --- a/rollout/trafficrouting/appmesh/appmesh.go +++ b/rollout/trafficrouting/appmesh/appmesh.go @@ -141,7 +141,7 @@ func (r *Reconciler) SetHeaderRoute(headerRouting *v1alpha1.SetHeaderRoute) erro } type routeReconcileContext struct { - route map[string]interface{} + route map[string]any routeIndex int routeFldPath *field.Path rCanaryVnodeRef *v1alpha1.AppMeshVirtualNodeReference @@ -170,7 +170,7 @@ func (r *Reconciler) reconcileVirtualRouter(ctx context.Context, rRoutes []strin for idx, routeI := range routesI { routeFldPath := routesFldPath.Index(idx) - route, ok := routeI.(map[string]interface{}) + route, ok := routeI.(map[string]any) if !ok { return field.Invalid(routeFldPath, uVrCopy.GetName(), ErrNotWellFormed) } @@ -232,12 +232,12 @@ func (r *Reconciler) reconcileRoute(ctx context.Context, uVr *unstructured.Unstr requiresUpdate := false for idx, wtI := range weightedTargets { wtFldPath := weightedTargetsFldPath.Index(idx) - wt, ok := wtI.(map[string]interface{}) + wt, ok := wtI.(map[string]any) if !ok { return false, field.Invalid(wtFldPath, uVr.GetName(), ErrNotWellFormed) } wtVnRefFldPath := wtFldPath.Child("virtualNodeRef") - wtVnRef, ok := wt["virtualNodeRef"].(map[string]interface{}) + wtVnRef, ok := wt["virtualNodeRef"].(map[string]any) if !ok { return false, field.Invalid(wtVnRefFldPath, uVr.GetName(), ErrNotWellFormed) } @@ -324,22 +324,22 @@ func (r *Reconciler) Type() string { return Type } -func getPodSelectorMatchLabels(vnode *unstructured.Unstructured) (map[string]interface{}, error) { +func getPodSelectorMatchLabels(vnode *unstructured.Unstructured) (map[string]any, error) { m, found, err := unstructured.NestedMap(vnode.Object, "spec", "podSelector", "matchLabels") if err != nil { return nil, err } if !found || m == nil { - return make(map[string]interface{}), nil + return make(map[string]any), nil } return m, nil } -func setPodSelectorMatchLabels(vnode *unstructured.Unstructured, ml map[string]interface{}) error { +func setPodSelectorMatchLabels(vnode *unstructured.Unstructured, ml map[string]any) error { return unstructured.SetNestedMap(vnode.Object, ml, "spec", "podSelector", "matchLabels") } -func toInt64(obj interface{}) (int64, error) { +func toInt64(obj any) (int64, error) { switch i := obj.(type) { case float64: return int64(i), nil @@ -370,8 +370,8 @@ func toInt64(obj interface{}) (int64, error) { } } -func GetRouteRule(route map[string]interface{}) (map[string]interface{}, string, error) { - var routeRule map[string]interface{} +func GetRouteRule(route map[string]any) (map[string]any, string, error) { + var routeRule map[string]any var routeType string for _, rType := range supportedRouteTypes { r, found, err := unstructured.NestedMap(route, rType) diff --git a/rollout/trafficrouting/appmesh/appmesh_test.go b/rollout/trafficrouting/appmesh/appmesh_test.go index 5f7ed41843..e110f8227b 100644 --- a/rollout/trafficrouting/appmesh/appmesh_test.go +++ b/rollout/trafficrouting/appmesh/appmesh_test.go @@ -218,7 +218,7 @@ func TestSetWeightWithUpdateVirtualRouterError(t *testing.T) { func TestSetWeightWithInvalidRoutes(t *testing.T) { type args struct { - routes []interface{} + routes []any fieldPathWithError string } @@ -236,7 +236,7 @@ func TestSetWeightWithInvalidRoutes(t *testing.T) { { name: "route with malformed content", args: args{ - routes: []interface{}{ + routes: []any{ "malformed-content", }, fieldPathWithError: field.NewPath("spec", "routes").Index(0).String(), @@ -245,9 +245,9 @@ func TestSetWeightWithInvalidRoutes(t *testing.T) { { name: "route with no name", args: args{ - routes: []interface{}{ - map[string]interface{}{ - "httpRoute": map[string]interface{}{}, + routes: []any{ + map[string]any{ + "httpRoute": map[string]any{}, }, }, fieldPathWithError: field.NewPath("spec", "routes").Index(0).Child("name").String(), @@ -256,10 +256,10 @@ func TestSetWeightWithInvalidRoutes(t *testing.T) { { name: "route with bad route-type", args: args{ - routes: []interface{}{ - map[string]interface{}{ + routes: []any{ + map[string]any{ "name": "primary", - "badRoute": map[string]interface{}{}, + "badRoute": map[string]any{}, }, }, fieldPathWithError: field.NewPath("spec", "routes").Index(0).String(), @@ -268,10 +268,10 @@ func TestSetWeightWithInvalidRoutes(t *testing.T) { { name: "route with no targets", args: args{ - routes: []interface{}{ - map[string]interface{}{ + routes: []any{ + map[string]any{ "name": "primary", - "httpRoute": map[string]interface{}{}, + "httpRoute": map[string]any{}, }, }, fieldPathWithError: field.NewPath("spec", "routes").Index(0).Child("httpRoute").Child("action").Child("weightedTargets").String(), @@ -654,9 +654,9 @@ func TestUpdateHashWhenUpdateCanaryVirtualNodeFails(t *testing.T) { func TestUpdateHashWithVirtualNodeMissingMatchLabels(t *testing.T) { canaryVnode := unstructuredutil.StrToUnstructuredUnsafe(baselineCanaryVnode) - unstructured.SetNestedMap(canaryVnode.Object, make(map[string]interface{}), "spec", "podSelector") + unstructured.SetNestedMap(canaryVnode.Object, make(map[string]any), "spec", "podSelector") stableVnode := unstructuredutil.StrToUnstructuredUnsafe(baselineStableVnode) - unstructured.SetNestedMap(stableVnode.Object, make(map[string]interface{}), "spec", "podSelector") + unstructured.SetNestedMap(stableVnode.Object, make(map[string]any), "spec", "podSelector") client := testutil.NewFakeDynamicClient(canaryVnode, stableVnode) cfg := ReconcilerConfig{ Rollout: fakeRollout(), @@ -704,13 +704,13 @@ func assertSetWeightAction(t *testing.T, action k8stesting.Action, desiredWeight routesI, _, err := unstructured.NestedSlice(uVr, "spec", "routes") assert.Nil(t, err) for _, routeI := range routesI { - route, _ := routeI.(map[string]interface{}) + route, _ := routeI.(map[string]any) weightedTargetsI, found, err := unstructured.NestedSlice(route, routeType, "action", "weightedTargets") assert.Nil(t, err) assert.True(t, found, "Did not find weightedTargets in route") assert.Len(t, weightedTargetsI, 2) for _, wtI := range weightedTargetsI { - wt, _ := wtI.(map[string]interface{}) + wt, _ := wtI.(map[string]any) vnodeName, _, err := unstructured.NestedString(wt, "virtualNodeRef", "name") assert.Nil(t, err) weight, err := toInt64(wt["weight"]) diff --git a/rollout/trafficrouting/appmesh/resource_client.go b/rollout/trafficrouting/appmesh/resource_client.go index 4171b9a385..4dbc4bd8cc 100644 --- a/rollout/trafficrouting/appmesh/resource_client.go +++ b/rollout/trafficrouting/appmesh/resource_client.go @@ -61,7 +61,7 @@ func (rc *ResourceClient) GetVirtualRouterCRForVirtualService(ctx context.Contex return rc.GetVirtualRouterCR(ctx, namespace, name) } -func defaultIfEmpty(strI interface{}, defaultStr string) string { +func defaultIfEmpty(strI any, defaultStr string) string { if strI == nil { return defaultStr } else { diff --git a/rollout/trafficrouting/istio/controller.go b/rollout/trafficrouting/istio/controller.go index 847ae65956..c85c4bc118 100644 --- a/rollout/trafficrouting/istio/controller.go +++ b/rollout/trafficrouting/istio/controller.go @@ -43,7 +43,7 @@ const ( type IstioControllerConfig struct { ArgoprojClientSet roclientset.Interface DynamicClientSet dynamic.Interface - EnqueueRollout func(ro interface{}) + EnqueueRollout func(ro any) RolloutsInformer informers.RolloutInformer VirtualServiceInformer cache.SharedIndexInformer DestinationRuleInformer cache.SharedIndexInformer @@ -67,7 +67,7 @@ func NewIstioController(cfg IstioControllerConfig) *IstioController { // Add a Rollout index against referenced VirtualServices and DestinationRules util.CheckErr(cfg.RolloutsInformer.Informer().AddIndexers(cache.Indexers{ - virtualServiceIndexName: func(obj interface{}) (strings []string, e error) { + virtualServiceIndexName: func(obj any) (strings []string, e error) { if ro := unstructuredutil.ObjectToRollout(obj); ro != nil { return istioutil.GetRolloutVirtualServiceKeys(ro), nil } @@ -75,7 +75,7 @@ func NewIstioController(cfg IstioControllerConfig) *IstioController { }, })) util.CheckErr(cfg.RolloutsInformer.Informer().AddIndexers(cache.Indexers{ - destinationRuleIndexName: func(obj interface{}) (strings []string, e error) { + destinationRuleIndexName: func(obj any) (strings []string, e error) { if ro := unstructuredutil.ObjectToRollout(obj); ro != nil { return istioutil.GetRolloutDesinationRuleKeys(ro), nil } @@ -85,27 +85,27 @@ func NewIstioController(cfg IstioControllerConfig) *IstioController { // When a VirtualService changes, simply enqueue the referencing rollout c.VirtualServiceInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { c.EnqueueRolloutFromIstioVirtualService(obj) }, // TODO: DeepEquals on httpRoutes - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { c.EnqueueRolloutFromIstioVirtualService(new) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { c.EnqueueRolloutFromIstioVirtualService(obj) }, }) // When a DestinationRule changes, enqueue the DestinationRule for processing c.DestinationRuleInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { c.EnqueueDestinationRule(obj) }, - UpdateFunc: func(old, new interface{}) { + UpdateFunc: func(old, new any) { c.EnqueueDestinationRule(new) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { c.EnqueueDestinationRule(obj) }, }) @@ -158,13 +158,13 @@ func (c *IstioController) Run(ctx context.Context) { // EnqueueDestinationRule examines a VirtualService, finds the Rollout referencing // that VirtualService, and enqueues the corresponding Rollout for reconciliation -func (c *IstioController) EnqueueDestinationRule(obj interface{}) { +func (c *IstioController) EnqueueDestinationRule(obj any) { controllerutil.EnqueueRateLimited(obj, c.destinationRuleWorkqueue) } // EnqueueRolloutFromIstioVirtualService examines a VirtualService, finds the Rollout referencing // that VirtualService, and enqueues the corresponding Rollout for reconciliation -func (c *IstioController) EnqueueRolloutFromIstioVirtualService(vsvc interface{}) { +func (c *IstioController) EnqueueRolloutFromIstioVirtualService(vsvc any) { acc, err := meta.Accessor(vsvc) if err != nil { log.Errorf("Error processing istio VirtualService from watch: %v: %v", err, vsvc) diff --git a/rollout/trafficrouting/istio/controller_test.go b/rollout/trafficrouting/istio/controller_test.go index af37f11053..97d85cbaff 100644 --- a/rollout/trafficrouting/istio/controller_test.go +++ b/rollout/trafficrouting/istio/controller_test.go @@ -45,7 +45,7 @@ func NewFakeIstioController(objs ...runtime.Object) *IstioController { c := NewIstioController(IstioControllerConfig{ ArgoprojClientSet: rolloutClient, DynamicClientSet: dynamicClientSet, - EnqueueRollout: func(ro interface{}) {}, + EnqueueRollout: func(ro any) {}, RolloutsInformer: rolloutInformerFactory.Argoproj().V1alpha1().Rollouts(), VirtualServiceInformer: virtualServiceInformer, DestinationRuleInformer: destinationRuleInformer, @@ -178,7 +178,7 @@ spec: key, err := cache.MetaNamespaceKeyFunc(destRule) assert.NoError(t, err) enqueueCalled := false - c.EnqueueRollout = func(obj interface{}) { + c.EnqueueRollout = func(obj any) { enqueueCalled = true } @@ -199,7 +199,7 @@ spec: key, err := cache.MetaNamespaceKeyFunc(destRule) assert.NoError(t, err) enqueueCalled := false - c.EnqueueRollout = func(obj interface{}) { + c.EnqueueRollout = func(obj any) { enqueueCalled = true } @@ -219,7 +219,7 @@ spec: key, err := cache.MetaNamespaceKeyFunc(destRule) assert.NoError(t, err) enqueueCalled := false - c.EnqueueRollout = func(obj interface{}) { + c.EnqueueRollout = func(obj any) { enqueueCalled = true } diff --git a/rollout/trafficrouting/istio/istio.go b/rollout/trafficrouting/istio/istio.go index 70b0cc0e68..dd44da7b25 100644 --- a/rollout/trafficrouting/istio/istio.go +++ b/rollout/trafficrouting/istio/istio.go @@ -74,26 +74,26 @@ const ( invalidCasting = "Invalid casting: field '%s' is not of type '%s'" ) -func (patches virtualServicePatches) patchVirtualService(httpRoutes []interface{}, tlsRoutes []interface{}, tcpRoutes []interface{}) error { +func (patches virtualServicePatches) patchVirtualService(httpRoutes []any, tlsRoutes []any, tcpRoutes []any) error { for _, patch := range patches { - var route map[string]interface{} + var route map[string]any err := false if patch.routeType == Http { - route, err = httpRoutes[patch.routeIndex].(map[string]interface{}) + route, err = httpRoutes[patch.routeIndex].(map[string]any) } else if patch.routeType == Tls { - route, err = tlsRoutes[patch.routeIndex].(map[string]interface{}) + route, err = tlsRoutes[patch.routeIndex].(map[string]any) } else if patch.routeType == Tcp { - route, err = tcpRoutes[patch.routeIndex].(map[string]interface{}) + route, err = tcpRoutes[patch.routeIndex].(map[string]any) } if !err { return fmt.Errorf(invalidCasting, patch.routeType+"[]", "map[string]interface") } - destinations, ok := route["route"].([]interface{}) + destinations, ok := route["route"].([]any) if !ok { return fmt.Errorf(invalidCasting, patch.routeType+"[].route", "[]interface") } if patch.destinationIndex < len(destinations) { - destination, ok := destinations[patch.destinationIndex].(map[string]interface{}) + destination, ok := destinations[patch.destinationIndex].(map[string]any) if !ok { return fmt.Errorf(invalidCasting, patch.routeType+"[].route[].destination", "map[string]interface") } @@ -105,9 +105,9 @@ func (patches virtualServicePatches) patchVirtualService(httpRoutes []interface{ } route["route"] = destinations } else { - destination := make(map[string]interface{}, 0) + destination := make(map[string]any, 0) destination["weight"] = float64(patch.weight) - destination["destination"] = map[string]interface{}{"host": patch.host} + destination["destination"] = map[string]any{"host": patch.host} destinations = append(destinations, destination) route["route"] = destinations } @@ -388,12 +388,12 @@ func (r *Reconciler) UpdateHash(canaryHash, stableHash string, additionalDestina // destinationRuleReplaceExtraMarshal relace the key of "Extra" with the actual content // e.g., "trafficpolicy" and return the bytes of the new object func destinationRuleReplaceExtraMarshal(dRule *DestinationRule) []byte { - dRuleNew := map[string]interface{}{} + dRuleNew := map[string]any{} dRuleNew["metadata"] = dRule.ObjectMeta.DeepCopy() - subsets := []map[string]interface{}{} + subsets := []map[string]any{} for _, subset := range dRule.Spec.Subsets { - newsubset := map[string]interface{}{} + newsubset := map[string]any{} newsubset["name"] = subset.Name newsubset["labels"] = subset.Labels @@ -402,7 +402,7 @@ func destinationRuleReplaceExtraMarshal(dRule *DestinationRule) []byte { continue } - extra := map[string]interface{}{} + extra := map[string]any{} inputbyte, _ := json.Marshal(subset.Extra) json.Unmarshal(inputbyte, &extra) @@ -412,7 +412,7 @@ func destinationRuleReplaceExtraMarshal(dRule *DestinationRule) []byte { } subsets = append(subsets, newsubset) } - dRuleNew["spec"] = map[string]interface{}{ + dRuleNew["spec"] = map[string]any{ "subsets": subsets, "host": dRule.Spec.Host, } @@ -474,7 +474,7 @@ func unstructuredToDestinationRules(un *unstructured.Unstructured) ([]byte, *Des func unMarshalSubsets(dRule *DestinationRule, dRuleBytes []byte) error { var err error - unstructured := map[string]interface{}{} + unstructured := map[string]any{} var extractFieldBytes func([]byte, string) ([]byte, error) extractFieldBytes = func(input []byte, name string) ([]byte, error) { err = json.Unmarshal(input, &unstructured) @@ -498,7 +498,7 @@ func unMarshalSubsets(dRule *DestinationRule, dRuleBytes []byte) error { return err } - subsetsMap := []map[string]interface{}{} + subsetsMap := []map[string]any{} err = json.Unmarshal(subsetsBytes, &subsetsMap) if err != nil { return err @@ -523,9 +523,9 @@ func unMarshalSubsets(dRule *DestinationRule, dRuleBytes []byte) error { return nil } -func UnmarshalJson(input []byte, result interface{}) (map[string]interface{}, error) { +func UnmarshalJson(input []byte, result any) (map[string]any, error) { // unmarshal json to a map - foomap := make(map[string]interface{}) + foomap := make(map[string]any) json.Unmarshal(input, &foomap) // create a mapstructure decoder @@ -545,7 +545,7 @@ func UnmarshalJson(input []byte, result interface{}) (map[string]interface{}, er } // copy and return unused fields - unused := map[string]interface{}{} + unused := map[string]any{} for _, k := range md.Unused { unused[k] = foomap[k] } @@ -565,7 +565,7 @@ func jsonBytesToDestinationRule(dRuleBytes []byte) (*DestinationRule, error) { return &dRule, nil } -func GetHttpRoutesI(obj *unstructured.Unstructured) ([]interface{}, error) { +func GetHttpRoutesI(obj *unstructured.Unstructured) ([]any, error) { httpRoutesI, notFound, err := unstructured.NestedSlice(obj.Object, "spec", Http) if !notFound { return nil, fmt.Errorf(SpecHttpNotFound) @@ -576,7 +576,7 @@ func GetHttpRoutesI(obj *unstructured.Unstructured) ([]interface{}, error) { return httpRoutesI, nil } -func GetTlsRoutesI(obj *unstructured.Unstructured) ([]interface{}, error) { +func GetTlsRoutesI(obj *unstructured.Unstructured) ([]any, error) { tlsRoutesI, notFound, err := unstructured.NestedSlice(obj.Object, "spec", Tls) if !notFound { return nil, fmt.Errorf(SpecHttpNotFound) @@ -587,7 +587,7 @@ func GetTlsRoutesI(obj *unstructured.Unstructured) ([]interface{}, error) { return tlsRoutesI, nil } -func GetTcpRoutesI(obj *unstructured.Unstructured) ([]interface{}, error) { +func GetTcpRoutesI(obj *unstructured.Unstructured) ([]any, error) { tcpRoutesI, notFound, err := unstructured.NestedSlice(obj.Object, "spec", Tcp) if !notFound { return nil, fmt.Errorf(".spec.tcp is not defined") @@ -598,7 +598,7 @@ func GetTcpRoutesI(obj *unstructured.Unstructured) ([]interface{}, error) { return tcpRoutesI, nil } -func GetHttpRoutes(httpRoutesI []interface{}) ([]VirtualServiceHTTPRoute, error) { +func GetHttpRoutes(httpRoutesI []any) ([]VirtualServiceHTTPRoute, error) { routeBytes, err := json.Marshal(httpRoutesI) if err != nil { return nil, err @@ -613,7 +613,7 @@ func GetHttpRoutes(httpRoutesI []interface{}) ([]VirtualServiceHTTPRoute, error) return httpRoutes, nil } -func GetTlsRoutes(obj *unstructured.Unstructured, tlsRoutesI []interface{}) ([]VirtualServiceTLSRoute, error) { +func GetTlsRoutes(obj *unstructured.Unstructured, tlsRoutesI []any) ([]VirtualServiceTLSRoute, error) { routeBytes, err := json.Marshal(tlsRoutesI) if err != nil { return nil, err @@ -628,7 +628,7 @@ func GetTlsRoutes(obj *unstructured.Unstructured, tlsRoutesI []interface{}) ([]V return tlsRoutes, nil } -func GetTcpRoutes(obj *unstructured.Unstructured, tcpRoutesI []interface{}) ([]VirtualServiceTCPRoute, error) { +func GetTcpRoutes(obj *unstructured.Unstructured, tcpRoutesI []any) ([]VirtualServiceTCPRoute, error) { routeBytes, err := json.Marshal(tcpRoutesI) if err != nil { return nil, err @@ -825,8 +825,8 @@ func (r *Reconciler) getDestinationRule(dRuleSpec *v1alpha1.IstioDestinationRule return origBytes, dRule, dRuleNew, nil } -func createHeaderRoute(virtualService v1alpha1.IstioVirtualService, unVsvc *unstructured.Unstructured, headerRouting *v1alpha1.SetHeaderRoute, host string, subset string) map[string]interface{} { - var routeMatches []interface{} +func createHeaderRoute(virtualService v1alpha1.IstioVirtualService, unVsvc *unstructured.Unstructured, headerRouting *v1alpha1.SetHeaderRoute, host string, subset string) map[string]any { + var routeMatches []any for _, hrm := range headerRouting.Match { routeMatches = append(routeMatches, createHeaderRouteMatch(hrm)) } @@ -838,41 +838,41 @@ func createHeaderRoute(virtualService v1alpha1.IstioVirtualService, unVsvc *unst canaryDestination := routeDestination(host, port.Number, subset, 100) - return map[string]interface{}{ + return map[string]any{ "name": headerRouting.Name, "match": routeMatches, - "route": []interface{}{canaryDestination}, + "route": []any{canaryDestination}, } } -func createHeaderRouteMatch(hrm v1alpha1.HeaderRoutingMatch) interface{} { - res := map[string]interface{}{} +func createHeaderRouteMatch(hrm v1alpha1.HeaderRoutingMatch) any { + res := map[string]any{} value := hrm.HeaderValue setMapValueIfNotEmpty(res, "exact", value.Exact) setMapValueIfNotEmpty(res, "regex", value.Regex) setMapValueIfNotEmpty(res, "prefix", value.Prefix) - return map[string]interface{}{ - "headers": map[string]interface{}{hrm.HeaderName: res}, + return map[string]any{ + "headers": map[string]any{hrm.HeaderName: res}, } } -func setMapValueIfNotEmpty(m map[string]interface{}, key string, value string) { +func setMapValueIfNotEmpty(m map[string]any, key string, value string) { if value != "" { m[key] = value } } -func routeDestination(host string, port uint32, subset string, weight int64) map[string]interface{} { - dest := map[string]interface{}{ +func routeDestination(host string, port uint32, subset string, weight int64) map[string]any { + dest := map[string]any{ "host": host, } if port > 0 { - dest["port"] = map[string]interface{}{"number": int64(port)} + dest["port"] = map[string]any{"number": int64(port)} } if subset != "" { dest["subset"] = subset } - routeValue := map[string]interface{}{ + routeValue := map[string]any{ "weight": float64(weight), "destination": dest, } @@ -1041,10 +1041,10 @@ func ValidateHTTPRoutes(r *v1alpha1.Rollout, routeNames []string, httpRoutes []V if err != nil { return fmt.Errorf("[ValidateHTTPRoutes] failed to marshal http routes: %w", err) } - var httpRoutesI []interface{} + var httpRoutesI []any err = json.Unmarshal(httpRoutesBytes, &httpRoutesI) if err != nil { - return fmt.Errorf("[ValidateHTTPRoutes] failed to marshal http routes to []interface{}: %w", err) + return fmt.Errorf("[ValidateHTTPRoutes] failed to marshal http routes to []any: %w", err) } _, httpRoutesNotWithinManagedRoutes, err := splitManagedRoutesAndNonManagedRoutes(r.Spec.Strategy.Canary.TrafficRouting.ManagedRoutes, httpRoutesI) @@ -1234,7 +1234,7 @@ func (r *Reconciler) reconcileVirtualServiceMirrorRoutes(virtualService v1alpha1 if !found { return fmt.Errorf(SpecHttpNotFound) } - vsRoutes = append([]interface{}{mR}, vsRoutes...) + vsRoutes = append([]any{mR}, vsRoutes...) if err := unstructured.SetNestedSlice(istioVirtualService.Object, vsRoutes, "spec", Http); err != nil { return fmt.Errorf("[reconcileVirtualServiceMirrorRoutes] failed to update virtual service routes via set nested slice: %w", err) } @@ -1243,8 +1243,8 @@ func (r *Reconciler) reconcileVirtualServiceMirrorRoutes(virtualService v1alpha1 } // getVirtualServiceHttpRoutes This returns all the http routes from an istio virtual service as both a rollouts wrapped type -// []VirtualServiceHTTPRoute and a []interface{} of VirtualServiceHTTPRoute -func getVirtualServiceHttpRoutes(obj *unstructured.Unstructured) ([]VirtualServiceHTTPRoute, []interface{}, error) { +// []VirtualServiceHTTPRoute and a []any of VirtualServiceHTTPRoute +func getVirtualServiceHttpRoutes(obj *unstructured.Unstructured) ([]VirtualServiceHTTPRoute, []any, error) { httpRoutesI, err := GetHttpRoutesI(obj) if err != nil { return nil, nil, fmt.Errorf("[getVirtualServiceHttpRoutes] failed to get http route interfaces: %w", err) @@ -1256,9 +1256,9 @@ func getVirtualServiceHttpRoutes(obj *unstructured.Unstructured) ([]VirtualServi return routes, httpRoutesI, nil } -// createMirrorRoute This returns a map[string]interface{} of an istio virtual service mirror route configuration using the last +// createMirrorRoute This returns a map[string]any of an istio virtual service mirror route configuration using the last // set weight as values for the non-matching destinations and canary service for the matching destination. -func createMirrorRoute(virtualService v1alpha1.IstioVirtualService, httpRoutes []VirtualServiceHTTPRoute, mirrorRouting *v1alpha1.SetMirrorRoute, canarySvc string, subset string) (map[string]interface{}, error) { +func createMirrorRoute(virtualService v1alpha1.IstioVirtualService, httpRoutes []VirtualServiceHTTPRoute, mirrorRouting *v1alpha1.SetMirrorRoute, canarySvc string, subset string) (map[string]any, error) { var percent int32 if mirrorRouting.Percentage == nil { percent = 100 @@ -1289,12 +1289,12 @@ func createMirrorRoute(virtualService v1alpha1.IstioVirtualService, httpRoutes [ mirrorDestinations.Port = &Port{Number: route[0].Destination.Port.Number} } - mirrorRoute := map[string]interface{}{ + mirrorRoute := map[string]any{ "name": mirrorRouting.Name, "match": istioMatch, "route": route, "mirror": mirrorDestinations, - "mirrorPercentage": map[string]interface{}{"value": float64(percent)}, + "mirrorPercentage": map[string]any{"value": float64(percent)}, } mirrorRouteBytes, err := json.Marshal(mirrorRoute) @@ -1302,7 +1302,7 @@ func createMirrorRoute(virtualService v1alpha1.IstioVirtualService, httpRoutes [ return nil, fmt.Errorf("[createMirrorRoute] failed to marshal mirror route: %w", err) } - var mirrorRouteI map[string]interface{} + var mirrorRouteI map[string]any err = json.Unmarshal(mirrorRouteBytes, &mirrorRouteI) if err != nil { return nil, fmt.Errorf("[createMirrorRoute] failed to unmarshal mirror route: %w", err) @@ -1336,11 +1336,11 @@ func removeRoute(istioVirtualService *unstructured.Unstructured, routeName strin return fmt.Errorf(SpecHttpNotFound) } - var newVsRoutes []interface{} + var newVsRoutes []any for _, route := range vsRoutes { - routeMap, ok := route.(map[string]interface{}) + routeMap, ok := route.(map[string]any) if !ok { - return fmt.Errorf("Could not cast type to map[string]interface{} to find route name in Istio Virtual Service") + return fmt.Errorf("Could not cast type to map[string]any to find route name in Istio Virtual Service") } routeNameIstioSvc, ok := routeMap["name"].(string) if !ok { @@ -1392,8 +1392,8 @@ func (r *Reconciler) orderRoutes(istioVirtualService *unstructured.Unstructured) // splitManagedRoutesAndNonManagedRoutes This splits the routes from an istio virtual service into two slices // one slice contains all the routes that are also in the rollouts managedRoutes object and one that contains routes // that where only in the virtual service (aka routes that where manually added by user) -func splitManagedRoutesAndNonManagedRoutes(managedRoutes []v1alpha1.MangedRoutes, httpRouteI []interface{}) (httpRoutesWithinManagedRoutes []map[string]interface{}, httpRoutesNotWithinManagedRoutes []map[string]interface{}, err error) { - var httpRoutes []map[string]interface{} +func splitManagedRoutesAndNonManagedRoutes(managedRoutes []v1alpha1.MangedRoutes, httpRouteI []any) (httpRoutesWithinManagedRoutes []map[string]any, httpRoutesNotWithinManagedRoutes []map[string]any, err error) { + var httpRoutes []map[string]any jsonHttpRoutes, err := json.Marshal(httpRouteI) if err != nil { @@ -1424,11 +1424,11 @@ func splitManagedRoutesAndNonManagedRoutes(managedRoutes []v1alpha1.MangedRoutes return httpRoutesWithinManagedRoutes, httpRoutesNotWithinManagedRoutes, nil } -// getOrderedVirtualServiceRoutes This returns an []interface{} of istio virtual routes where the routes are ordered based +// getOrderedVirtualServiceRoutes This returns an []any of istio virtual routes where the routes are ordered based // on the rollouts managedRoutes field. We take the routes from the rollouts managedRoutes field order them and place them on top // of routes that are manually defined within the virtual service (aka. routes that users have defined manually) -func getOrderedVirtualServiceRoutes(httpRouteI []interface{}, managedRoutes []v1alpha1.MangedRoutes, httpRoutesWithinManagedRoutes []map[string]interface{}, httpRoutesNotWithinManagedRoutes []map[string]interface{}) ([]interface{}, error) { - var orderedManagedRoutes []map[string]interface{} +func getOrderedVirtualServiceRoutes(httpRouteI []any, managedRoutes []v1alpha1.MangedRoutes, httpRoutesWithinManagedRoutes []map[string]any, httpRoutesNotWithinManagedRoutes []map[string]any) ([]any, error) { + var orderedManagedRoutes []map[string]any for _, route := range managedRoutes { for _, managedRoute := range httpRoutesWithinManagedRoutes { if route.Name == managedRoute["name"] { @@ -1439,10 +1439,10 @@ func getOrderedVirtualServiceRoutes(httpRouteI []interface{}, managedRoutes []v1 orderedVirtualServiceHTTPRoutes := append(orderedManagedRoutes, httpRoutesNotWithinManagedRoutes...) - var orderedInterfaceVSVCHTTPRoutes []interface{} + var orderedInterfaceVSVCHTTPRoutes []any for _, routeMap := range orderedVirtualServiceHTTPRoutes { for _, route := range httpRouteI { - r := route.(map[string]interface{}) + r := route.(map[string]any) // Not checking the cast success here is ok because it covers the case when the route has no name name, rNameOK := r["name"].(string) @@ -1530,7 +1530,7 @@ func (r *Reconciler) RemoveManagedRoutes() error { if err != nil { return fmt.Errorf("[RemoveManagedRoutes] failed to marshal non-managed routes: %w", err) } - var nonManagedRoutesI []interface{} + var nonManagedRoutesI []any if err := json.Unmarshal(jsonNonManagedRoutes, &nonManagedRoutesI); err != nil { return fmt.Errorf("[RemoveManagedRoutes] failed to split managaed and non-managed routes: %w", err) } diff --git a/rollout/trafficrouting/istio/istio_test.go b/rollout/trafficrouting/istio/istio_test.go index ea6474ef5f..c18cdedae5 100644 --- a/rollout/trafficrouting/istio/istio_test.go +++ b/rollout/trafficrouting/istio/istio_test.go @@ -866,18 +866,18 @@ func TestHttpReconcileHeaderRouteWithExtra(t *testing.T) { assert.NoError(t, err) assert.True(t, found) - r0 := routes[0].(map[string]interface{}) - route, found := r0["route"].([]interface{}) + r0 := routes[0].(map[string]any) + route, found := r0["route"].([]any) assert.True(t, found) - port1 := route[0].(map[string]interface{})["destination"].(map[string]interface{})["port"].(map[string]interface{})["number"] + port1 := route[0].(map[string]any)["destination"].(map[string]any)["port"].(map[string]any)["number"] assert.True(t, port1 == int64(8443)) - r1 := routes[1].(map[string]interface{}) + r1 := routes[1].(map[string]any) _, found = r1["retries"] assert.True(t, found) - r2 := routes[2].(map[string]interface{}) + r2 := routes[2].(map[string]any) _, found = r2["retries"] assert.True(t, found) _, found = r2["corsPolicy"] @@ -891,14 +891,14 @@ func TestHttpReconcileHeaderRouteWithExtra(t *testing.T) { assert.NoError(t, err) assert.True(t, found) - r0 = routes[0].(map[string]interface{}) - route, found = r0["route"].([]interface{}) + r0 = routes[0].(map[string]any) + route, found = r0["route"].([]any) assert.True(t, found) - port1 = route[0].(map[string]interface{})["destination"].(map[string]interface{})["port"].(map[string]interface{})["number"] + port1 = route[0].(map[string]any)["destination"].(map[string]any)["port"].(map[string]any)["number"] assert.True(t, port1 == float64(8443)) - r2 = routes[1].(map[string]interface{}) + r2 = routes[1].(map[string]any) _, found = r2["retries"] assert.True(t, found) _, found = r2["corsPolicy"] @@ -1498,34 +1498,34 @@ func TestInvalidPatches(t *testing.T) { weight: 10, }} { - invalidHTTPRoute := make([]interface{}, 1) - invalidTlsRoute := make([]interface{}, 1) - invalidTcpRoute := make([]interface{}, 1) + invalidHTTPRoute := make([]any, 1) + invalidTlsRoute := make([]any, 1) + invalidTcpRoute := make([]any, 1) invalidHTTPRoute[0] = "not a map" err := patches.patchVirtualService(invalidHTTPRoute, invalidTlsRoute, invalidTcpRoute) assert.Error(t, err, invalidCasting, "http[]", "map[string]interface") } { - invalidHTTPRoute := []interface{}{ - map[string]interface{}{ + invalidHTTPRoute := []any{ + map[string]any{ "route": "not a []interface", }, } - invalidTlsRoute := make([]interface{}, 1) - invalidTcpRoute := make([]interface{}, 1) + invalidTlsRoute := make([]any, 1) + invalidTcpRoute := make([]any, 1) err := patches.patchVirtualService(invalidHTTPRoute, invalidTlsRoute, invalidTcpRoute) assert.Error(t, err, invalidCasting, "http[].route", "[]interface") } { - invalidHTTPRoute := []interface{}{ - map[string]interface{}{ - "route": []interface{}{ + invalidHTTPRoute := []any{ + map[string]any{ + "route": []any{ "destination", }, }, } - invalidTlsRoute := make([]interface{}, 1) - invalidTCPRoute := make([]interface{}, 1) + invalidTlsRoute := make([]any, 1) + invalidTCPRoute := make([]any, 1) err := patches.patchVirtualService(invalidHTTPRoute, invalidTlsRoute, invalidTCPRoute) assert.Error(t, err, invalidCasting, "http[].route[].destination", "map[string]interface") } @@ -2543,20 +2543,20 @@ func TestHttpReconcileMirrorRouteWithExtraFields(t *testing.T) { assert.NoError(t, err) assert.True(t, found) - r0 := routes[0].(map[string]interface{}) - mirrorRoute, found := r0["route"].([]interface{}) + r0 := routes[0].(map[string]any) + mirrorRoute, found := r0["route"].([]any) assert.True(t, found) - port1 := mirrorRoute[0].(map[string]interface{})["destination"].(map[string]interface{})["port"].(map[string]interface{})["number"] - port2 := mirrorRoute[1].(map[string]interface{})["destination"].(map[string]interface{})["port"].(map[string]interface{})["number"] + port1 := mirrorRoute[0].(map[string]any)["destination"].(map[string]any)["port"].(map[string]any)["number"] + port2 := mirrorRoute[1].(map[string]any)["destination"].(map[string]any)["port"].(map[string]any)["number"] assert.True(t, port1 == float64(8443)) assert.True(t, port2 == float64(8443)) - r1 := routes[1].(map[string]interface{}) + r1 := routes[1].(map[string]any) _, found = r1["retries"] assert.True(t, found) - r2 := routes[2].(map[string]interface{}) + r2 := routes[2].(map[string]any) _, found = r2["retries"] assert.True(t, found) _, found = r2["corsPolicy"] diff --git a/rollout/trafficrouting/istio/istio_types.go b/rollout/trafficrouting/istio/istio_types.go index 9d8f37d3f3..9544efc49e 100644 --- a/rollout/trafficrouting/istio/istio_types.go +++ b/rollout/trafficrouting/istio/istio_types.go @@ -108,5 +108,5 @@ type Subset struct { Name string `json:"name,omitempty"` Labels map[string]string `json:"labels,omitempty"` // TrafficPolicy *json.RawMessage `json:"trafficPolicy,omitempty"` - Extra map[string]interface{} `json:",omitempty"` + Extra map[string]any `json:",omitempty"` } diff --git a/rollout/trafficrouting/plugin/rpc/rpc.go b/rollout/trafficrouting/plugin/rpc/rpc.go index 78cb4103d9..297ff9d21b 100644 --- a/rollout/trafficrouting/plugin/rpc/rpc.go +++ b/rollout/trafficrouting/plugin/rpc/rpc.go @@ -65,7 +65,7 @@ type TrafficRouterPluginRPC struct{ client *rpc.Client } // this gets called once during startup of the plugin and can be used to set up informers or k8s clients etc. func (g *TrafficRouterPluginRPC) InitPlugin() types.RpcError { var resp types.RpcError - err := g.client.Call("Plugin.InitPlugin", new(interface{}), &resp) + err := g.client.Call("Plugin.InitPlugin", new(any), &resp) if err != nil { return types.RpcError{ErrorString: fmt.Sprintf("InitPlugin rpc call error: %s", err)} } @@ -75,7 +75,7 @@ func (g *TrafficRouterPluginRPC) InitPlugin() types.RpcError { // UpdateHash informs a traffic routing reconciler about new canary, stable, and additionalDestination(s) pod hashes func (g *TrafficRouterPluginRPC) UpdateHash(rollout *v1alpha1.Rollout, canaryHash string, stableHash string, additionalDestinations []v1alpha1.WeightDestination) types.RpcError { var resp types.RpcError - var args interface{} = UpdateHashArgs{ + var args any = UpdateHashArgs{ Rollout: *rollout, CanaryHash: canaryHash, StableHash: stableHash, @@ -91,7 +91,7 @@ func (g *TrafficRouterPluginRPC) UpdateHash(rollout *v1alpha1.Rollout, canaryHas // SetWeight sets the canary weight to the desired weight func (g *TrafficRouterPluginRPC) SetWeight(rollout *v1alpha1.Rollout, desiredWeight int32, additionalDestinations []v1alpha1.WeightDestination) types.RpcError { var resp types.RpcError - var args interface{} = SetWeightAndVerifyWeightArgs{ + var args any = SetWeightAndVerifyWeightArgs{ Rollout: *rollout, DesiredWeight: desiredWeight, AdditionalDestinations: additionalDestinations, @@ -106,7 +106,7 @@ func (g *TrafficRouterPluginRPC) SetWeight(rollout *v1alpha1.Rollout, desiredWei // SetHeaderRoute sets the header routing step func (g *TrafficRouterPluginRPC) SetHeaderRoute(rollout *v1alpha1.Rollout, setHeaderRoute *v1alpha1.SetHeaderRoute) types.RpcError { var resp types.RpcError - var args interface{} = SetHeaderArgs{ + var args any = SetHeaderArgs{ Rollout: *rollout, SetHeaderRoute: *setHeaderRoute, } @@ -120,7 +120,7 @@ func (g *TrafficRouterPluginRPC) SetHeaderRoute(rollout *v1alpha1.Rollout, setHe // SetMirrorRoute sets up the traffic router to mirror traffic to a service func (g *TrafficRouterPluginRPC) SetMirrorRoute(rollout *v1alpha1.Rollout, setMirrorRoute *v1alpha1.SetMirrorRoute) types.RpcError { var resp types.RpcError - var args interface{} = SetMirrorArgs{ + var args any = SetMirrorArgs{ Rollout: *rollout, SetMirrorRoute: *setMirrorRoute, } @@ -134,7 +134,7 @@ func (g *TrafficRouterPluginRPC) SetMirrorRoute(rollout *v1alpha1.Rollout, setMi // Type returns the type of the traffic routing reconciler func (g *TrafficRouterPluginRPC) Type() string { var resp string - err := g.client.Call("Plugin.Type", new(interface{}), &resp) + err := g.client.Call("Plugin.Type", new(any), &resp) if err != nil { return fmt.Sprintf("Type rpc call error: %s", err) } @@ -146,7 +146,7 @@ func (g *TrafficRouterPluginRPC) Type() string { // Returns nil if weight verification is not supported or not applicable func (g *TrafficRouterPluginRPC) VerifyWeight(rollout *v1alpha1.Rollout, desiredWeight int32, additionalDestinations []v1alpha1.WeightDestination) (types.RpcVerified, types.RpcError) { var resp VerifyWeightResponse - var args interface{} = SetWeightAndVerifyWeightArgs{ + var args any = SetWeightAndVerifyWeightArgs{ Rollout: *rollout, DesiredWeight: desiredWeight, AdditionalDestinations: additionalDestinations, @@ -161,7 +161,7 @@ func (g *TrafficRouterPluginRPC) VerifyWeight(rollout *v1alpha1.Rollout, desired // RemoveAllRoutes Removes all routes that are managed by rollouts by looking at spec.strategy.canary.trafficRouting.managedRoutes func (g *TrafficRouterPluginRPC) RemoveManagedRoutes(rollout *v1alpha1.Rollout) types.RpcError { var resp types.RpcError - var args interface{} = RemoveManagedRoutesArgs{ + var args any = RemoveManagedRoutesArgs{ Rollout: *rollout, } err := g.client.Call("Plugin.RemoveManagedRoutes", &args, &resp) @@ -180,13 +180,13 @@ type TrafficRouterRPCServer struct { // InitPlugin this is the server aka the controller side function that receives calls from the client side rpc (controller) // this gets called once during startup of the plugin and can be used to set up informers or k8s clients etc. -func (s *TrafficRouterRPCServer) InitPlugin(args interface{}, resp *types.RpcError) error { +func (s *TrafficRouterRPCServer) InitPlugin(args any, resp *types.RpcError) error { *resp = s.Impl.InitPlugin() return nil } // UpdateHash informs a traffic routing reconciler about new canary, stable, and additionalDestination(s) pod hashes -func (s *TrafficRouterRPCServer) UpdateHash(args interface{}, resp *types.RpcError) error { +func (s *TrafficRouterRPCServer) UpdateHash(args any, resp *types.RpcError) error { runArgs, ok := args.(*UpdateHashArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -196,7 +196,7 @@ func (s *TrafficRouterRPCServer) UpdateHash(args interface{}, resp *types.RpcErr } // SetWeight sets the canary weight to the desired weight -func (s *TrafficRouterRPCServer) SetWeight(args interface{}, resp *types.RpcError) error { +func (s *TrafficRouterRPCServer) SetWeight(args any, resp *types.RpcError) error { setWeigthArgs, ok := args.(*SetWeightAndVerifyWeightArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -206,7 +206,7 @@ func (s *TrafficRouterRPCServer) SetWeight(args interface{}, resp *types.RpcErro } // SetHeaderRoute sets the header routing step -func (s *TrafficRouterRPCServer) SetHeaderRoute(args interface{}, resp *types.RpcError) error { +func (s *TrafficRouterRPCServer) SetHeaderRoute(args any, resp *types.RpcError) error { setHeaderArgs, ok := args.(*SetHeaderArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -216,7 +216,7 @@ func (s *TrafficRouterRPCServer) SetHeaderRoute(args interface{}, resp *types.Rp } // SetMirrorRoute sets up the traffic router to mirror traffic to a service -func (s *TrafficRouterRPCServer) SetMirrorRoute(args interface{}, resp *types.RpcError) error { +func (s *TrafficRouterRPCServer) SetMirrorRoute(args any, resp *types.RpcError) error { setMirrorArgs, ok := args.(*SetMirrorArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -226,14 +226,14 @@ func (s *TrafficRouterRPCServer) SetMirrorRoute(args interface{}, resp *types.Rp } // Type returns the type of the traffic routing reconciler -func (s *TrafficRouterRPCServer) Type(args interface{}, resp *string) error { +func (s *TrafficRouterRPCServer) Type(args any, resp *string) error { *resp = s.Impl.Type() return nil } // VerifyWeight returns true if the canary is at the desired weight and additionalDestinations are at the weights specified // Returns nil if weight verification is not supported or not applicable -func (s *TrafficRouterRPCServer) VerifyWeight(args interface{}, resp *VerifyWeightResponse) error { +func (s *TrafficRouterRPCServer) VerifyWeight(args any, resp *VerifyWeightResponse) error { verifyWeightArgs, ok := args.(*SetWeightAndVerifyWeightArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -247,7 +247,7 @@ func (s *TrafficRouterRPCServer) VerifyWeight(args interface{}, resp *VerifyWeig } // RemoveAllRoutes Removes all routes that are managed by rollouts by looking at spec.strategy.canary.trafficRouting.managedRoutes -func (s *TrafficRouterRPCServer) RemoveManagedRoutes(args interface{}, resp *types.RpcError) error { +func (s *TrafficRouterRPCServer) RemoveManagedRoutes(args any, resp *types.RpcError) error { removeManagedRoutesArgs, ok := args.(*RemoveManagedRoutesArgs) if !ok { return fmt.Errorf("invalid args %s", args) @@ -271,10 +271,10 @@ type RpcTrafficRouterPlugin struct { Impl TrafficRouterPlugin } -func (p *RpcTrafficRouterPlugin) Server(*plugin.MuxBroker) (interface{}, error) { +func (p *RpcTrafficRouterPlugin) Server(*plugin.MuxBroker) (any, error) { return &TrafficRouterRPCServer{Impl: p.Impl}, nil } -func (RpcTrafficRouterPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error) { +func (RpcTrafficRouterPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (any, error) { return &TrafficRouterPluginRPC{client: c}, nil } diff --git a/rollout/trafficrouting/traefik/mocks/traefik.go b/rollout/trafficrouting/traefik/mocks/traefik.go index aedfd659cd..b0cd361809 100644 --- a/rollout/trafficrouting/traefik/mocks/traefik.go +++ b/rollout/trafficrouting/traefik/mocks/traefik.go @@ -35,10 +35,10 @@ var ( ErrorTraefikServiceObj *unstructured.Unstructured ) -func (f *FakeRecorder) Eventf(object runtime.Object, opts argoRecord.EventOptions, messageFmt string, args ...interface{}) { +func (f *FakeRecorder) Eventf(object runtime.Object, opts argoRecord.EventOptions, messageFmt string, args ...any) { } -func (f *FakeRecorder) Warnf(object runtime.Object, opts argoRecord.EventOptions, messageFmt string, args ...interface{}) { +func (f *FakeRecorder) Warnf(object runtime.Object, opts argoRecord.EventOptions, messageFmt string, args ...any) { } func (f *FakeRecorder) K8sRecorder() record.EventRecorder { diff --git a/rollout/trafficrouting/traefik/traefik.go b/rollout/trafficrouting/traefik/traefik.go index f5b507207f..5840bf4a42 100644 --- a/rollout/trafficrouting/traefik/traefik.go +++ b/rollout/trafficrouting/traefik/traefik.go @@ -134,10 +134,10 @@ func (r *Reconciler) SetWeight(desiredWeight int32, additionalDestinations ...v1 return err } -func getService(serviceName string, services []interface{}) (map[string]interface{}, error) { - var selectedService map[string]interface{} +func getService(serviceName string, services []any) (map[string]any, error) { + var selectedService map[string]any for _, service := range services { - typedService, ok := service.(map[string]interface{}) + typedService, ok := service.(map[string]any) if !ok { return nil, errors.New("Failed type assertion setting weight for traefik service") } diff --git a/rollout/trafficrouting/traefik/traefik_test.go b/rollout/trafficrouting/traefik/traefik_test.go index d7dbbbd297..892468df0a 100644 --- a/rollout/trafficrouting/traefik/traefik_test.go +++ b/rollout/trafficrouting/traefik/traefik_test.go @@ -305,7 +305,7 @@ func TestGetService(t *testing.T) { t.Run("ErrorGetServiceFromStruct ", func(t *testing.T) { // Given t.Parallel() - services := []interface{}{ + services := []any{ mocks.FakeService{Weight: 12}, } @@ -319,12 +319,12 @@ func TestGetService(t *testing.T) { t.Run("ErrorGetServiceFromMap", func(t *testing.T) { // Given t.Parallel() - services := map[string]interface{}{ + services := map[string]any{ "weight": 100, } // When - selectedServices, err := getService("default", []interface{}{services}) + selectedServices, err := getService("default", []any{services}) // Then assert.Nil(t, selectedServices) @@ -334,12 +334,12 @@ func TestGetService(t *testing.T) { // Given t.Parallel() const serviceName string = "default" - services := map[string]interface{}{ + services := map[string]any{ "name": serviceName, } // When - selectedServices, err := getService(serviceName, []interface{}{services}) + selectedServices, err := getService(serviceName, []any{services}) // Then assert.NotNil(t, selectedServices) @@ -348,12 +348,12 @@ func TestGetService(t *testing.T) { t.Run("ErrorGetServiceFromNil", func(t *testing.T) { // Given t.Parallel() - services := map[string]interface{}{ + services := map[string]any{ "name": nil, } // When - selectedServices, err := getService("default", []interface{}{services}) + selectedServices, err := getService("default", []any{services}) // Then assert.Nil(t, selectedServices) diff --git a/rollout/trafficrouting_test.go b/rollout/trafficrouting_test.go index 21aea362ae..78817492f6 100644 --- a/rollout/trafficrouting_test.go +++ b/rollout/trafficrouting_test.go @@ -121,7 +121,7 @@ func TestReconcileTrafficRoutingVerifyWeightFalse(t *testing.T) { f.fakeTrafficRouting.On("VerifyWeight", mock.Anything).Return(pointer.BoolPtr(false), nil) c, i, k8sI := f.newController(noResyncPeriodFunc) enqueued := false - c.enqueueRolloutAfter = func(obj interface{}, duration time.Duration) { + c.enqueueRolloutAfter = func(obj any, duration time.Duration) { enqueued = true } f.expectPatchRolloutAction(ro) diff --git a/server/server.go b/server/server.go index cbb742333d..3482634491 100644 --- a/server/server.go +++ b/server/server.go @@ -290,15 +290,15 @@ func (s *ArgoRolloutsServer) WatchRolloutInfos(q *rollout.RolloutInfoListQuery, rolloutUpdateChan := make(chan *v1alpha1.Rollout) rolloutInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { rolloutUpdateChan <- obj.(*v1alpha1.Rollout) }, - UpdateFunc: func(oldObj, newObj interface{}) { + UpdateFunc: func(oldObj, newObj any) { rolloutUpdateChan <- newObj.(*v1alpha1.Rollout) }, }) podsInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{ - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { podUpdated(obj.(*corev1.Pod), rsLister, rolloutsLister, rolloutUpdateChan) }, }) diff --git a/service/service.go b/service/service.go index f81c82c771..be143de83d 100644 --- a/service/service.go +++ b/service/service.go @@ -82,7 +82,7 @@ type Controller struct { resyncPeriod time.Duration metricServer *metrics.MetricsServer - enqueueRollout func(obj interface{}) + enqueueRollout func(obj any) } // NewController returns a new service controller @@ -103,7 +103,7 @@ func NewController(cfg ControllerConfig) *Controller { } util.CheckErr(cfg.RolloutsInformer.Informer().AddIndexers(cache.Indexers{ - serviceIndexName: func(obj interface{}) (strings []string, e error) { + serviceIndexName: func(obj any) (strings []string, e error) { if ro := unstructuredutil.ObjectToRollout(obj); ro != nil { return serviceutil.GetRolloutServiceKeys(ro), nil } @@ -112,17 +112,17 @@ func NewController(cfg ControllerConfig) *Controller { })) cfg.ServicesInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { + AddFunc: func(obj any) { controllerutil.Enqueue(obj, cfg.ServiceWorkqueue) }, - UpdateFunc: func(oldObj, newObj interface{}) { + UpdateFunc: func(oldObj, newObj any) { controllerutil.Enqueue(newObj, cfg.ServiceWorkqueue) }, - DeleteFunc: func(obj interface{}) { + DeleteFunc: func(obj any) { controllerutil.Enqueue(obj, cfg.ServiceWorkqueue) }, }) - controller.enqueueRollout = func(obj interface{}) { + controller.enqueueRollout = func(obj any) { controllerutil.EnqueueRateLimited(obj, cfg.RolloutWorkqueue) } diff --git a/service/service_test.go b/service/service_test.go index 69dea462da..35722443ac 100644 --- a/service/service_test.go +++ b/service/service_test.go @@ -86,7 +86,7 @@ func newFakeServiceController(svc *corev1.Service, rollout *v1alpha1.Rollout) (* MetricsServer: metricsServer, }) enqueuedObjects := map[string]int{} - c.enqueueRollout = func(obj interface{}) { + c.enqueueRollout = func(obj any) { var key string var err error if key, err = cache.MetaNamespaceKeyFunc(obj); err != nil { diff --git a/test/e2e/apisix_test.go b/test/e2e/apisix_test.go index 1c8d2de3a3..dfdea9ce60 100644 --- a/test/e2e/apisix_test.go +++ b/test/e2e/apisix_test.go @@ -4,13 +4,14 @@ package e2e import ( + "testing" + "time" + a6 "github.com/argoproj/argo-rollouts/rollout/trafficrouting/apisix" "github.com/argoproj/argo-rollouts/test/fixtures" "github.com/stretchr/testify/suite" "github.com/tj/assert" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "testing" - "time" ) const ( @@ -132,7 +133,7 @@ func (s *APISIXSuite) check(t *fixtures.Then, stableWeight int64, canaryWeight i assert.NoError(s.T(), err) for _, backend := range backends { - typedBackend, ok := backend.(map[string]interface{}) + typedBackend, ok := backend.(map[string]any) assert.Equal(s.T(), ok, true) nameOfCurrentBackend, isFound, err := unstructured.NestedString(typedBackend, "serviceName") assert.NoError(s.T(), err) @@ -165,14 +166,14 @@ func (s *APISIXSuite) checkSetHeader(t *fixtures.Then, stableWeight int64, canar apisixHttpRouteObj, err := a6.GetHttpRoute(apisixHttpRoutesObj, apisixRouteName) assert.NoError(s.T(), err) - exprs, isFound, err := unstructured.NestedSlice(apisixHttpRouteObj.(map[string]interface{}), "match", "exprs") + exprs, isFound, err := unstructured.NestedSlice(apisixHttpRouteObj.(map[string]any), "match", "exprs") assert.NoError(s.T(), err) assert.Equal(s.T(), isFound, true) assert.Equal(s.T(), 1, len(exprs)) expr := exprs[0] - exprObj, ok := expr.(map[string]interface{}) + exprObj, ok := expr.(map[string]any) assert.Equal(s.T(), ok, true) op, isFound, err := unstructured.NestedString(exprObj, "op") diff --git a/test/e2e/appmesh_test.go b/test/e2e/appmesh_test.go index f7936d24d1..4d173e8c56 100644 --- a/test/e2e/appmesh_test.go +++ b/test/e2e/appmesh_test.go @@ -72,12 +72,12 @@ func (s *AppMeshSuite) getWeightedTargets(uVr *unstructured.Unstructured) map[st result := make(map[string]weightedTargets) routesI, _, _ := unstructured.NestedSlice(uVr.Object, "spec", "routes") for _, rI := range routesI { - route, _ := rI.(map[string]interface{}) + route, _ := rI.(map[string]any) routeName, _ := route["name"].(string) wtsI, _, _ := unstructured.NestedSlice(route, "httpRoute", "action", "weightedTargets") wtStruct := weightedTargets{} for _, wtI := range wtsI { - wt, _ := wtI.(map[string]interface{}) + wt, _ := wtI.(map[string]any) vnodeName, _, _ := unstructured.NestedString(wt, "virtualNodeRef", "name") weight, _, _ := unstructured.NestedInt64(wt, "weight") fmt.Printf("Found wt %+v with vnodeName (%s), weight (%d)", wt, vnodeName, weight) diff --git a/test/e2e/functional_test.go b/test/e2e/functional_test.go index d4b27d3e3f..e6aff1477f 100644 --- a/test/e2e/functional_test.go +++ b/test/e2e/functional_test.go @@ -1313,7 +1313,7 @@ spec: if err != nil { return err } - containers[0] = map[string]interface{}{ + containers[0] = map[string]any{ "name": "rollouts-demo", "image": "argoproj/rollouts-demo:error", } @@ -1333,7 +1333,7 @@ spec: if err != nil { return err } - containers[0] = map[string]interface{}{ + containers[0] = map[string]any{ "name": "rollouts-demo", "image": "argoproj/rollouts-demo:blue", } diff --git a/test/fixtures/given.go b/test/fixtures/given.go index 19e7552f60..57e17251c6 100644 --- a/test/fixtures/given.go +++ b/test/fixtures/given.go @@ -44,7 +44,7 @@ func (g *Given) SetSteps(text string) *Given { steps := make([]rov1.CanaryStep, 0) err := yaml.Unmarshal([]byte(text), &steps) g.CheckError(err) - var stepsUn []interface{} + var stepsUn []any for _, step := range steps { stepUn, err := runtime.DefaultUnstructuredConverter.ToUnstructured(&step) g.CheckError(err) diff --git a/test/fixtures/then.go b/test/fixtures/then.go index eac4c9419b..c41c14d92a 100644 --- a/test/fixtures/then.go +++ b/test/fixtures/then.go @@ -54,7 +54,7 @@ func (t *Then) ExpectRolloutStatus(expectedStatus string) *Then { return t } -func (t *Then) ExpectReplicaCounts(desired, current, updated, ready, available interface{}) *Then { +func (t *Then) ExpectReplicaCounts(desired, current, updated, ready, available any) *Then { ro, err := t.rolloutClient.ArgoprojV1alpha1().Rollouts(t.namespace).Get(t.Context, t.rollout.GetName(), metav1.GetOptions{}) t.CheckError(err) if desired != nil && desired.(int) != int(defaults.GetReplicasOrDefault(ro.Spec.Replicas)) { diff --git a/test/fixtures/when.go b/test/fixtures/when.go index 82e84d3a42..395e614bcf 100644 --- a/test/fixtures/when.go +++ b/test/fixtures/when.go @@ -88,7 +88,7 @@ func (w *When) injectDelays(un *unstructured.Unstructured) { w.CheckError(err) containersIf, _, err := unstructured.NestedSlice(un.Object, "spec", "template", "spec", "containers") w.CheckError(err) - container := containersIf[0].(map[string]interface{}) + container := containersIf[0].(map[string]any) container["lifecycle"] = lifecycleObj containersIf[0] = container err = unstructured.SetNestedSlice(un.Object, containersIf, "spec", "template", "spec", "containers") @@ -103,7 +103,7 @@ func (w *When) injectImagePrefix(un *unstructured.Unstructured) { } containersIf, _, err := unstructured.NestedSlice(un.Object, "spec", "template", "spec", "containers") w.CheckError(err) - container := containersIf[0].(map[string]interface{}) + container := containersIf[0].(map[string]any) container["image"] = imagePrefix + container["image"].(string) containersIf[0] = container err = unstructured.SetNestedSlice(un.Object, containersIf, "spec", "template", "spec", "containers") @@ -233,7 +233,7 @@ func (w *When) PatchSpec(patch string) *When { w.t.Fatal("Rollout not set") } // convert YAML patch to JSON patch - var patchObj map[string]interface{} + var patchObj map[string]any err := yaml.Unmarshal([]byte(patch), &patchObj) w.CheckError(err) jsonPatch, err := json.Marshal(patchObj) diff --git a/test/util/util.go b/test/util/util.go index 071aca3f7b..5f5c20d5c7 100644 --- a/test/util/util.go +++ b/test/util/util.go @@ -16,7 +16,7 @@ import ( // ObjectFromYAML returns a runtime.Object from a yaml string func ObjectFromYAML(yamlStr string) *unstructured.Unstructured { - obj := make(map[string]interface{}) + obj := make(map[string]any) err := yaml.Unmarshal([]byte(yamlStr), &obj) if err != nil { panic(err) diff --git a/utils/analysis/factory.go b/utils/analysis/factory.go index 278f24a19a..0e17e587a7 100644 --- a/utils/analysis/factory.go +++ b/utils/analysis/factory.go @@ -243,7 +243,7 @@ func ValidateMetric(metric v1alpha1.Metric) error { func extractValueFromRollout(r *v1alpha1.Rollout, path string) (string, error) { j, _ := json.Marshal(r) - m := interface{}(nil) + m := any(nil) json.Unmarshal(j, &m) sections := regexp.MustCompile("[\\.\\[\\]]+").Split(path, -1) for _, section := range sections { @@ -251,7 +251,7 @@ func extractValueFromRollout(r *v1alpha1.Rollout, path string) (string, error) { continue // if path ends with a separator char, Split returns an empty last section } - if asArray, ok := m.([]interface{}); ok { + if asArray, ok := m.([]any); ok { if i, err := strconv.Atoi(section); err != nil { return "", fmt.Errorf("invalid index '%s'", section) } else if i >= len(asArray) { @@ -259,7 +259,7 @@ func extractValueFromRollout(r *v1alpha1.Rollout, path string) (string, error) { } else { m = asArray[i] } - } else if asMap, ok := m.(map[string]interface{}); ok { + } else if asMap, ok := m.(map[string]any); ok { m = asMap[section] } else { return "", fmt.Errorf("invalid path %s in rollout", path) @@ -271,8 +271,8 @@ func extractValueFromRollout(r *v1alpha1.Rollout, path string) (string, error) { } var isArray, isMap bool - _, isArray = m.([]interface{}) - _, isMap = m.(map[string]interface{}) + _, isArray = m.([]any) + _, isMap = m.(map[string]any) if isArray || isMap { return "", fmt.Errorf("path %s in rollout must terminate in a primitive value", path) } diff --git a/utils/analysis/helpers.go b/utils/analysis/helpers.go index caedeb472c..6e95bd47fa 100644 --- a/utils/analysis/helpers.go +++ b/utils/analysis/helpers.go @@ -541,9 +541,9 @@ func NewAnalysisRunFromUnstructured(obj *unstructured.Unstructured, templateArgs } // Set args - newArgVals := []interface{}{} + newArgVals := []any{} for i := 0; i < len(newArgs); i++ { - var newArgInterface map[string]interface{} + var newArgInterface map[string]any newArgBytes, err := json.Marshal(newArgs[i]) if err != nil { return nil, err diff --git a/utils/analysis/helpers_test.go b/utils/analysis/helpers_test.go index 3fbefadce4..207f5fa023 100644 --- a/utils/analysis/helpers_test.go +++ b/utils/analysis/helpers_test.go @@ -822,7 +822,7 @@ func TestNewAnalysisRunFromUnstructured(t *testing.T) { assert.Equal(t, len(args), len(arArgs)) for i, arg := range arArgs { - argnv := arg.(map[string]interface{}) + argnv := arg.(map[string]any) assert.Equal(t, *args[i].Value, argnv["value"]) } } diff --git a/utils/aws/aws.go b/utils/aws/aws.go index b8884a0589..42b4907836 100644 --- a/utils/aws/aws.go +++ b/utils/aws/aws.go @@ -300,7 +300,7 @@ func GetTargetGroupBindingsByService(ctx context.Context, dynamicClient dynamic. return tgbs, nil } -func toTargetGroupBinding(obj map[string]interface{}) (*TargetGroupBinding, error) { +func toTargetGroupBinding(obj map[string]any) (*TargetGroupBinding, error) { data, err := json.Marshal(obj) if err != nil { return nil, err @@ -368,7 +368,7 @@ func VerifyTargetGroupBinding(ctx context.Context, logCtx *log.Entry, awsClnt Cl logCtx.Warn("Unable to match TargetGroupBinding spec.serviceRef.port to Service spec.ports") return nil, nil } - logCtx = logCtx.WithFields(map[string]interface{}{ + logCtx = logCtx.WithFields(map[string]any{ "service": svc.Name, "targetgroupbinding": tgb.Name, "tg": tgb.Spec.TargetGroupARN, diff --git a/utils/controller/controller.go b/utils/controller/controller.go index 63aa6f11cd..36ebfa9088 100644 --- a/utils/controller/controller.go +++ b/utils/controller/controller.go @@ -115,7 +115,7 @@ func processNextWorkItem(ctx context.Context, workqueue workqueue.RateLimitingIn } // We wrap this block in a func so we can defer c.workqueue.Done. - err := func(obj interface{}) error { + err := func(obj any) error { // We call Done here so the workqueue knows we have finished // processing this item. We also must remember to call Forget if we // do not want this work item being re-queued. For example, we do @@ -179,14 +179,14 @@ func processNextWorkItem(ctx context.Context, workqueue workqueue.RateLimitingIn } // metaNamespaceKeyFunc is a wrapper around cache.MetaNamespaceKeyFunc but also accepts strings -func metaNamespaceKeyFunc(obj interface{}) (string, error) { +func metaNamespaceKeyFunc(obj any) (string, error) { if objStr, ok := obj.(string); ok { obj = cache.ExplicitKey(objStr) } return cache.MetaNamespaceKeyFunc(obj) } -func Enqueue(obj interface{}, q workqueue.RateLimitingInterface) { +func Enqueue(obj any, q workqueue.RateLimitingInterface) { var key string var err error if key, err = metaNamespaceKeyFunc(obj); err != nil { @@ -196,7 +196,7 @@ func Enqueue(obj interface{}, q workqueue.RateLimitingInterface) { q.Add(key) } -func EnqueueAfter(obj interface{}, duration time.Duration, q workqueue.RateLimitingInterface) { +func EnqueueAfter(obj any, duration time.Duration, q workqueue.RateLimitingInterface) { var key string var err error if key, err = metaNamespaceKeyFunc(obj); err != nil { @@ -206,7 +206,7 @@ func EnqueueAfter(obj interface{}, duration time.Duration, q workqueue.RateLimit q.AddAfter(key, duration) } -func EnqueueRateLimited(obj interface{}, q workqueue.RateLimitingInterface) { +func EnqueueRateLimited(obj any, q workqueue.RateLimitingInterface) { var key string var err error if key, err = metaNamespaceKeyFunc(obj); err != nil { @@ -222,7 +222,7 @@ func EnqueueRateLimited(obj interface{}, q workqueue.RateLimitingInterface) { // It then enqueues that ownerType resource to be processed. If the object does not // have an appropriate OwnerReference, it will simply be skipped. // This function assumes parent object is in the same namespace as the child -func EnqueueParentObject(obj interface{}, ownerType string, enqueue func(obj interface{})) { +func EnqueueParentObject(obj any, ownerType string, enqueue func(obj any)) { var object metav1.Object var ok bool if object, ok = obj.(metav1.Object); !ok { diff --git a/utils/controller/controller_test.go b/utils/controller/controller_test.go index 9fa54b5517..3761d05ba5 100644 --- a/utils/controller/controller_test.go +++ b/utils/controller/controller_test.go @@ -169,7 +169,7 @@ func TestEnqueueParentObjectInvalidObject(t *testing.T) { errorMessages = append(errorMessages, err) }) invalidObject := "invalid-object" - enqueueFunc := func(obj interface{}) {} + enqueueFunc := func(obj any) {} EnqueueParentObject(invalidObject, register.RolloutKind, enqueueFunc) assert.Len(t, errorMessages, 1) assert.Error(t, errorMessages[0], "error decoding object, invalid type") @@ -182,7 +182,7 @@ func TestEnqueueParentObjectInvalidTombstoneObject(t *testing.T) { }) invalidObject := cache.DeletedFinalStateUnknown{} - enqueueFunc := func(obj interface{}) {} + enqueueFunc := func(obj any) {} EnqueueParentObject(invalidObject, register.RolloutKind, enqueueFunc) assert.Len(t, errorMessages, 1) assert.Equal(t, "error decoding object tombstone, invalid type", errorMessages[0]) @@ -199,8 +199,8 @@ func TestEnqueueParentObjectNoOwner(t *testing.T) { Namespace: "default", }, } - enqueuedObjs := make([]interface{}, 0) - enqueueFunc := func(obj interface{}) { + enqueuedObjs := make([]any, 0) + enqueueFunc := func(obj any) { enqueuedObjs = append(enqueuedObjs, obj) } EnqueueParentObject(rs, register.RolloutKind, enqueueFunc) @@ -228,8 +228,8 @@ func TestEnqueueParentObjectDifferentOwnerKind(t *testing.T) { OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(experiment, experimentKind)}, }, } - enqueuedObjs := make([]interface{}, 0) - enqueueFunc := func(obj interface{}) { + enqueuedObjs := make([]any, 0) + enqueueFunc := func(obj any) { enqueuedObjs = append(enqueuedObjs, obj) } EnqueueParentObject(rs, register.RolloutKind, enqueueFunc) @@ -257,8 +257,8 @@ func TestEnqueueParentObjectOtherOwnerTypes(t *testing.T) { OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(deployment, deploymentKind)}, }, } - enqueuedObjs := make([]interface{}, 0) - enqueueFunc := func(obj interface{}) { + enqueuedObjs := make([]any, 0) + enqueueFunc := func(obj any) { enqueuedObjs = append(enqueuedObjs, obj) } EnqueueParentObject(rs, "Deployment", enqueueFunc) @@ -286,8 +286,8 @@ func TestEnqueueParentObjectEnqueueExperiment(t *testing.T) { OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(experiment, experimentKind)}, }, } - enqueuedObjs := make([]interface{}, 0) - enqueueFunc := func(obj interface{}) { + enqueuedObjs := make([]any, 0) + enqueueFunc := func(obj any) { enqueuedObjs = append(enqueuedObjs, obj) } client := fake.NewSimpleClientset(experiment) @@ -319,8 +319,8 @@ func TestEnqueueParentObjectEnqueueRollout(t *testing.T) { OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(rollout, rolloutKind)}, }, } - enqueuedObjs := make([]interface{}, 0) - enqueueFunc := func(obj interface{}) { + enqueuedObjs := make([]any, 0) + enqueueFunc := func(obj any) { enqueuedObjs = append(enqueuedObjs, obj) } client := fake.NewSimpleClientset(rollout) @@ -356,8 +356,8 @@ func TestEnqueueParentObjectRecoverTombstoneObject(t *testing.T) { Obj: rs, } - enqueuedObjs := make([]interface{}, 0) - enqueueFunc := func(obj interface{}) { + enqueuedObjs := make([]any, 0) + enqueueFunc := func(obj any) { enqueuedObjs = append(enqueuedObjs, obj) } client := fake.NewSimpleClientset(experiment) @@ -388,10 +388,10 @@ func TestInstanceIDRequirement(t *testing.T) { } func newObj(name, kind, apiVersion string) *unstructured.Unstructured { - obj := make(map[string]interface{}) + obj := make(map[string]any) obj["apiVersion"] = apiVersion obj["kind"] = kind - obj["metadata"] = map[string]interface{}{ + obj["metadata"] = map[string]any{ "name": name, "namespace": metav1.NamespaceDefault, } @@ -437,7 +437,7 @@ func TestProcessNextWatchObj(t *testing.T) { dInformer := dynamicinformers.NewDynamicSharedInformerFactory(client, func() time.Duration { return 0 }()) indexer := dInformer.ForResource(gvk).Informer().GetIndexer() indexer.AddIndexers(cache.Indexers{ - "testIndexer": func(obj interface{}) (strings []string, e error) { + "testIndexer": func(obj any) (strings []string, e error) { return []string{"default/foo"}, nil }, }) diff --git a/utils/diff/diff.go b/utils/diff/diff.go index 458afe4654..12ac705070 100644 --- a/utils/diff/diff.go +++ b/utils/diff/diff.go @@ -7,7 +7,7 @@ import ( ) // CreateTwoWayMergePatch is a helper to construct a two-way merge patch from objects (instead of bytes) -func CreateTwoWayMergePatch(orig, new, dataStruct interface{}) ([]byte, bool, error) { +func CreateTwoWayMergePatch(orig, new, dataStruct any) ([]byte, bool, error) { origBytes, err := json.Marshal(orig) if err != nil { return nil, false, err diff --git a/utils/evaluate/evaluate.go b/utils/evaluate/evaluate.go index b725d99c0f..a2c9a607cd 100644 --- a/utils/evaluate/evaluate.go +++ b/utils/evaluate/evaluate.go @@ -14,7 +14,7 @@ import ( "github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1" ) -func EvaluateResult(result interface{}, metric v1alpha1.Metric, logCtx logrus.Entry) (v1alpha1.AnalysisPhase, error) { +func EvaluateResult(result any, metric v1alpha1.Metric, logCtx logrus.Entry) (v1alpha1.AnalysisPhase, error) { successCondition := false failCondition := false var err error @@ -57,10 +57,10 @@ func EvaluateResult(result interface{}, metric v1alpha1.Metric, logCtx logrus.En } // EvalCondition evaluates the condition with the resultValue as an input -func EvalCondition(resultValue interface{}, condition string) (bool, error) { +func EvalCondition(resultValue any, condition string) (bool, error) { var err error - env := map[string]interface{}{ + env := map[string]any{ "result": valueFromPointer(resultValue), "asInt": asInt, "asFloat": asFloat, @@ -99,7 +99,7 @@ func isInf(f float64) bool { return math.IsInf(f, 0) } -func asInt(in interface{}) int64 { +func asInt(in any) int64 { switch i := in.(type) { case float64: return int64(i) @@ -135,7 +135,7 @@ func asInt(in interface{}) int64 { panic(fmt.Sprintf("asInt() not supported on %v %v", reflect.TypeOf(in), in)) } -func asFloat(in interface{}) float64 { +func asFloat(in any) float64 { switch i := in.(type) { case float64: return i @@ -188,8 +188,8 @@ func Equal(a, b []string) bool { return true } -func defaultFunc(resultValue interface{}) func(interface{}, interface{}) interface{} { - return func(_ interface{}, defaultValue interface{}) interface{} { +func defaultFunc(resultValue any) func(any, any) any { + return func(_ any, defaultValue any) any { if isNil(resultValue) { return defaultValue } @@ -197,14 +197,14 @@ func defaultFunc(resultValue interface{}) func(interface{}, interface{}) interfa } } -func isNilFunc(resultValue interface{}) func(interface{}) bool { - return func(_ interface{}) bool { +func isNilFunc(resultValue any) func(any) bool { + return func(_ any) bool { return isNil(resultValue) } } // isNil is courtesy of: https://gist.github.com/mangatmodi/06946f937cbff24788fa1d9f94b6b138 -func isNil(in interface{}) (out bool) { +func isNil(in any) (out bool) { if in == nil { out = true return @@ -220,7 +220,7 @@ func isNil(in interface{}) (out bool) { // valueFromPointer allows pointers to be passed in from the provider, but then extracts the value from // the pointer if the pointer is not nil, else returns nil -func valueFromPointer(in interface{}) (out interface{}) { +func valueFromPointer(in any) (out any) { if isNil(in) { return } diff --git a/utils/evaluate/evaluate_test.go b/utils/evaluate/evaluate_test.go index e058d2aa4b..7839e47256 100644 --- a/utils/evaluate/evaluate_test.go +++ b/utils/evaluate/evaluate_test.go @@ -126,11 +126,11 @@ func TestErrorWithInvalidReference(t *testing.T) { } func TestEvaluateArray(t *testing.T) { - floats := map[string]interface{}{ - "service_apdex": map[string]interface{}{ + floats := map[string]any{ + "service_apdex": map[string]any{ "label": nil, - "values": map[string]interface{}{ - "values": []interface{}{float64(2), float64(2)}, + "values": map[string]any{ + "values": []any{float64(2), float64(2)}, }, }, } @@ -169,7 +169,7 @@ func TestEvaluateAsIntPanic(t *testing.T) { func TestEvaluateAsInt(t *testing.T) { tests := []struct { - input interface{} + input any expression string expectation bool }{ @@ -186,7 +186,7 @@ func TestEvaluateAsInt(t *testing.T) { func TestEvaluateAsFloatError(t *testing.T) { tests := []struct { - input interface{} + input any expression string errRegexp string }{ @@ -203,7 +203,7 @@ func TestEvaluateAsFloatError(t *testing.T) { func TestEvaluateAsFloat(t *testing.T) { tests := []struct { - input interface{} + input any expression string expectation bool }{ diff --git a/utils/json/json.go b/utils/json/json.go index d946ff4621..96b2a3f7c7 100644 --- a/utils/json/json.go +++ b/utils/json/json.go @@ -10,7 +10,7 @@ import ( // MustMarshal marshals an object and panics if it failures. This function should only be used // when the object being passed in does not have any chance of failing (i.e. you constructed // the object yourself) -func MustMarshal(i interface{}) []byte { +func MustMarshal(i any) []byte { bytes, err := json.Marshal(i) if err != nil { panic(err) @@ -27,7 +27,7 @@ func (j *JSONMarshaler) ContentType() string { } // Marshal implements gwruntime.Marshaler. -func (j *JSONMarshaler) Marshal(v interface{}) ([]byte, error) { +func (j *JSONMarshaler) Marshal(v any) ([]byte, error) { return json.Marshal(v) } @@ -42,6 +42,6 @@ func (j *JSONMarshaler) NewEncoder(w io.Writer) gwruntime.Encoder { } // Unmarshal implements gwruntime.Marshaler. -func (j *JSONMarshaler) Unmarshal(data []byte, v interface{}) error { +func (j *JSONMarshaler) Unmarshal(data []byte, v any) error { return json.Unmarshal(data, v) } diff --git a/utils/json/json_test.go b/utils/json/json_test.go index 2b3b734963..1f3a18e19f 100644 --- a/utils/json/json_test.go +++ b/utils/json/json_test.go @@ -23,7 +23,7 @@ type I interface { } func TestMustMarshalPanics(t *testing.T) { - test := map[string]interface{}{ + test := map[string]any{ "foo": make(chan int), } assert.Panics(t, func() { MustMarshal(test) }) diff --git a/utils/log/log.go b/utils/log/log.go index 049f26f935..86a391fd2e 100644 --- a/utils/log/log.go +++ b/utils/log/log.go @@ -74,7 +74,7 @@ func WithObject(obj runtime.Object) *log.Entry { // This is an optimization that callers can use to avoid inferring this again from a runtime.Object func KindNamespaceName(logCtx *log.Entry) (string, string, string) { var kind string - var nameIf interface{} + var nameIf any var ok bool if nameIf, ok = logCtx.Data["rollout"]; ok { kind = "Rollout" @@ -118,7 +118,7 @@ func WithRedactor(entry log.Entry, secrets []string) *log.Entry { } func WithVersionFields(entry *log.Entry, r *v1alpha1.Rollout) *log.Entry { - return entry.WithFields(map[string]interface{}{ + return entry.WithFields(map[string]any{ "resourceVersion": r.ResourceVersion, "generation": r.Generation, }) diff --git a/utils/record/record.go b/utils/record/record.go index 87d83092f7..d2bd322acf 100644 --- a/utils/record/record.go +++ b/utils/record/record.go @@ -58,8 +58,8 @@ type EventOptions struct { } type EventRecorder interface { - Eventf(object runtime.Object, opts EventOptions, messageFmt string, args ...interface{}) - Warnf(object runtime.Object, opts EventOptions, messageFmt string, args ...interface{}) + Eventf(object runtime.Object, opts EventOptions, messageFmt string, args ...any) + Warnf(object runtime.Object, opts EventOptions, messageFmt string, args ...any) K8sRecorder() record.EventRecorder } @@ -75,7 +75,7 @@ type EventRecorderAdapter struct { NotificationSuccessCounter *prometheus.CounterVec NotificationSendPerformance *prometheus.HistogramVec - eventf func(object runtime.Object, warn bool, opts EventOptions, messageFmt string, args ...interface{}) + eventf func(object runtime.Object, warn bool, opts EventOptions, messageFmt string, args ...any) // apiFactory is a notifications engine API factory apiFactory api.Factory } @@ -110,8 +110,8 @@ type FakeEventRecorder struct { func NewFakeApiFactory() api.Factory { var ( settings = api.Settings{ConfigMapName: "my-config-map", SecretName: "my-secret", InitGetVars: func(cfg *api.Config, configMap *corev1.ConfigMap, secret *corev1.Secret) (api.GetVars, error) { - return func(obj map[string]interface{}, dest services.Destination) map[string]interface{} { - return map[string]interface{}{"obj": obj} + return func(obj map[string]any, dest services.Destination) map[string]any { + return map[string]any{"obj": obj} }, nil }} ) @@ -173,7 +173,7 @@ func NewFakeEventRecorder() *FakeEventRecorder { ).(*EventRecorderAdapter) recorder.Recorder = record.NewFakeRecorder(1000) fakeRecorder := &FakeEventRecorder{} - recorder.eventf = func(object runtime.Object, warn bool, opts EventOptions, messageFmt string, args ...interface{}) { + recorder.eventf = func(object runtime.Object, warn bool, opts EventOptions, messageFmt string, args ...any) { recorder.defaultEventf(object, warn, opts, messageFmt, args...) fakeRecorder.Events = append(fakeRecorder.Events, opts.EventReason) } @@ -181,21 +181,21 @@ func NewFakeEventRecorder() *FakeEventRecorder { return fakeRecorder } -func (e *EventRecorderAdapter) Eventf(object runtime.Object, opts EventOptions, messageFmt string, args ...interface{}) { +func (e *EventRecorderAdapter) Eventf(object runtime.Object, opts EventOptions, messageFmt string, args ...any) { if opts.EventType == "" { opts.EventType = corev1.EventTypeNormal } e.eventf(object, opts.EventType == corev1.EventTypeWarning, opts, messageFmt, args...) } -func (e *EventRecorderAdapter) Warnf(object runtime.Object, opts EventOptions, messageFmt string, args ...interface{}) { +func (e *EventRecorderAdapter) Warnf(object runtime.Object, opts EventOptions, messageFmt string, args ...any) { opts.EventType = corev1.EventTypeWarning e.eventf(object, true, opts, messageFmt, args...) } // defaultEventf is the default implementation of eventf, which is able to be overwritten for // test purposes -func (e *EventRecorderAdapter) defaultEventf(object runtime.Object, warn bool, opts EventOptions, messageFmt string, args ...interface{}) { +func (e *EventRecorderAdapter) defaultEventf(object runtime.Object, warn bool, opts EventOptions, messageFmt string, args ...any) { logCtx := logutil.WithObject(object) if opts.EventReason != "" { @@ -240,8 +240,8 @@ func NewAPIFactorySettings() api.Settings { SecretName: NotificationSecret, ConfigMapName: NotificationConfigMap, InitGetVars: func(cfg *api.Config, configMap *corev1.ConfigMap, secret *corev1.Secret) (api.GetVars, error) { - return func(obj map[string]interface{}, dest services.Destination) map[string]interface{} { - return map[string]interface{}{"rollout": obj, "time": timeExprs} + return func(obj map[string]any, dest services.Destination) map[string]any { + return map[string]any{"rollout": obj, "time": timeExprs} }, nil }, } @@ -319,12 +319,12 @@ func hash(input string) string { } // toObjectMap converts an object to a map for the purposes of sending to the notification engine -func toObjectMap(object interface{}) (map[string]interface{}, error) { +func toObjectMap(object any) (map[string]any, error) { objBytes, err := json.Marshal(object) if err != nil { return nil, err } - var objMap map[string]interface{} + var objMap map[string]any err = json.Unmarshal(objBytes, &objMap) if err != nil { return nil, err @@ -338,7 +338,7 @@ func toObjectMap(object interface{}) (map[string]interface{}, error) { if err != nil { return nil, err } - var templateMap map[string]interface{} + var templateMap map[string]any err = json.Unmarshal(templateBytes, &templateMap) if err != nil { return nil, err @@ -352,7 +352,7 @@ func toObjectMap(object interface{}) (map[string]interface{}, error) { if err != nil { return nil, err } - var selectorMap map[string]interface{} + var selectorMap map[string]any err = json.Unmarshal(selectorBytes, &selectorMap) if err != nil { return nil, err @@ -373,7 +373,7 @@ func translateReasonToTrigger(reason string) string { return "on-" + strings.ToLower(trigger) } -var timeExprs = map[string]interface{}{ +var timeExprs = map[string]any{ "Parse": parse, "Now": now, } diff --git a/utils/record/record_test.go b/utils/record/record_test.go index d7e64af1fa..6c494a3ac7 100644 --- a/utils/record/record_test.go +++ b/utils/record/record_test.go @@ -429,10 +429,10 @@ func TestNewAPIFactorySettings(t *testing.T) { getVars, err := settings.InitGetVars(nil, nil, nil) assert.NoError(t, err) - rollout := map[string]interface{}{"name": "hello"} + rollout := map[string]any{"name": "hello"} vars := getVars(rollout, services.Destination{}) - assert.Equal(t, map[string]interface{}{"rollout": rollout, "time": timeExprs}, vars) + assert.Equal(t, map[string]any{"rollout": rollout, "time": timeExprs}, vars) } func TestWorkloadRefObjectMap(t *testing.T) { diff --git a/utils/tolerantinformer/tolerantinformer_test.go b/utils/tolerantinformer/tolerantinformer_test.go index 351601e3a9..84c25c1215 100644 --- a/utils/tolerantinformer/tolerantinformer_test.go +++ b/utils/tolerantinformer/tolerantinformer_test.go @@ -122,7 +122,7 @@ func TestMalformedRolloutEphemeralCtr(t *testing.T) { verify(list[0]) } -func verifyAnalysisSpec(t *testing.T, s interface{}) { +func verifyAnalysisSpec(t *testing.T, s any) { // metrics: // - name: test // provider: diff --git a/utils/tolerantinformer/tollerantinformer.go b/utils/tolerantinformer/tollerantinformer.go index aba0bd7f29..e3996f9cce 100644 --- a/utils/tolerantinformer/tollerantinformer.go +++ b/utils/tolerantinformer/tollerantinformer.go @@ -14,7 +14,7 @@ import ( // convertObject converts a runtime.Object into the supplied concrete typed object // typedObj should be a pointer to a typed object which is desired to be filled in. // This is a best effort conversion which ignores unmarshalling errors. -func convertObject(object runtime.Object, typedObj interface{}) error { +func convertObject(object runtime.Object, typedObj any) error { un, ok := object.(*unstructured.Unstructured) if !ok { return fmt.Errorf("malformed object: expected \"*unstructured.Unstructured\", got \"%s\"", reflect.TypeOf(object).Name()) @@ -35,7 +35,7 @@ func convertObject(object runtime.Object, typedObj interface{}) error { return nil } -func fromUnstructuredViaJSON(u map[string]interface{}, obj interface{}) error { +func fromUnstructuredViaJSON(u map[string]any, obj any) error { data, err := json.Marshal(u) if err != nil { return err diff --git a/utils/unstructured/unstructured.go b/utils/unstructured/unstructured.go index 7c73812da3..a0dd341a48 100644 --- a/utils/unstructured/unstructured.go +++ b/utils/unstructured/unstructured.go @@ -13,7 +13,7 @@ import ( ) func StrToUnstructuredUnsafe(jsonStr string) *unstructured.Unstructured { - obj := make(map[string]interface{}) + obj := make(map[string]any) err := yaml.Unmarshal([]byte(jsonStr), &obj) if err != nil { panic(err) @@ -22,7 +22,7 @@ func StrToUnstructuredUnsafe(jsonStr string) *unstructured.Unstructured { } func StrToUnstructured(jsonStr string) (*unstructured.Unstructured, error) { - obj := make(map[string]interface{}) + obj := make(map[string]any) err := yaml.Unmarshal([]byte(jsonStr), &obj) if err != nil { return nil, err @@ -30,7 +30,7 @@ func StrToUnstructured(jsonStr string) (*unstructured.Unstructured, error) { return &unstructured.Unstructured{Object: obj}, nil } -func ObjectToRollout(obj interface{}) *v1alpha1.Rollout { +func ObjectToRollout(obj any) *v1alpha1.Rollout { un, ok := obj.(*unstructured.Unstructured) if ok { var ro v1alpha1.Rollout @@ -49,7 +49,7 @@ func ObjectToRollout(obj interface{}) *v1alpha1.Rollout { return ro } -func ObjectToAnalysisRun(obj interface{}) *v1alpha1.AnalysisRun { +func ObjectToAnalysisRun(obj any) *v1alpha1.AnalysisRun { un, ok := obj.(*unstructured.Unstructured) if ok { var ar v1alpha1.AnalysisRun @@ -67,7 +67,7 @@ func ObjectToAnalysisRun(obj interface{}) *v1alpha1.AnalysisRun { return ar } -func ObjectToExperiment(obj interface{}) *v1alpha1.Experiment { +func ObjectToExperiment(obj any) *v1alpha1.Experiment { un, ok := obj.(*unstructured.Unstructured) if ok { var ex v1alpha1.Experiment @@ -93,7 +93,7 @@ func SplitYAML(out string) ([]*unstructured.Unstructured, error) { parts := diffSeparator.Split(out, -1) var objs []*unstructured.Unstructured for _, part := range parts { - var objMap map[string]interface{} + var objMap map[string]any err := yaml.Unmarshal([]byte(part), &objMap) if err != nil { return objs, err From 124a3c880f55314994a41a430137a5606947ecdb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 12:04:01 -0500 Subject: [PATCH 060/187] chore(deps): bump actions/checkout from 3 to 4 (#3012) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/changelog.yml | 2 +- .github/workflows/codeql.yml | 2 +- .github/workflows/e2e.yaml | 2 +- .github/workflows/gh-pages.yaml | 2 +- .github/workflows/go.yml | 6 +++--- .github/workflows/image-reuse.yaml | 4 ++-- .github/workflows/release.yaml | 6 +++--- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 6120a179b9..6bfae53fe4 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -12,7 +12,7 @@ jobs: pull-requests: write # for peter-evans/create-pull-request to create a PR runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Update Changelog diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d8309ea267..f9915287da 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 749a4b4f55..a3e7aed29f 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -49,7 +49,7 @@ jobs: uses: actions/setup-go@v4.1.0 with: go-version: '1.20' - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@v4 - name: Setup k3s env: INSTALL_K3S_CHANNEL: v${{ matrix.kubernetes-minor-version }} diff --git a/.github/workflows/gh-pages.yaml b/.github/workflows/gh-pages.yaml index 59fece9c6e..6746b7406d 100644 --- a/.github/workflows/gh-pages.yaml +++ b/.github/workflows/gh-pages.yaml @@ -18,7 +18,7 @@ jobs: contents: write # for peaceiris/actions-gh-pages to push pages branch runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@v4 - name: Setup Python uses: actions/setup-python@v4 with: diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 1b5d170f12..961203bcef 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -40,7 +40,7 @@ jobs: with: go-version: ${{ env.GOLANG_VERSION }} - name: Checkout code - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v4 - name: Run golangci-lint uses: golangci/golangci-lint-action@v3 with: @@ -57,7 +57,7 @@ jobs: id: go - name: Check out code into the Go module directory - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v4 - name: Restore go build cache uses: actions/cache@v3 @@ -101,7 +101,7 @@ jobs: GOPATH: /home/runner/go steps: - name: Checkout code - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v4 - name: Setup Golang uses: actions/setup-go@v4.1.0 with: diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index 41b749a33d..341d328a2e 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -58,14 +58,14 @@ jobs: image-digest: ${{ steps.image.outputs.digest }} steps: - name: Checkout code - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.3.0 + uses: actions/checkout@v4 # v3.3.0 with: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} if: ${{ github.ref_type == 'tag'}} - name: Checkout code - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.3.0 + uses: actions/checkout@v4 # v3.3.0 if: ${{ github.ref_type != 'tag'}} - name: Setup Golang diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2eb8fce786..6ac65d4be1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -85,7 +85,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@v4 # v3.5.2 with: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} @@ -159,7 +159,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.3.0 + uses: actions/checkout@v4 # v3.3.0 with: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} @@ -232,7 +232,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.3.0 + uses: actions/checkout@v4 # v3.3.0 with: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} From 111c5f7c297a75af0e31b0092f4c422616585abf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 08:33:19 -0500 Subject: [PATCH 061/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.38 to 1.18.39 (#3018) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.38 to 1.18.39. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.38...config/v1.18.39) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 194ea42f40..b28cebc838 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.38 + github.com/aws/aws-sdk-go-v2/config v1.18.39 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3 github.com/blang/semver v3.5.1+incompatible @@ -82,14 +82,14 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.36 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.37 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect diff --git a/go.sum b/go.sum index 391f548a45..daf8ad437a 100644 --- a/go.sum +++ b/go.sum @@ -105,10 +105,10 @@ github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WN github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.38 h1:CByQCELMgm2tM1lAehx3XNg0R/pfeXsYzqn0Aq2chJQ= -github.com/aws/aws-sdk-go-v2/config v1.18.38/go.mod h1:vNm9Hf5VgG2fSUWhT3zFrqN/RosGcabFMYgiSoxKFU8= -github.com/aws/aws-sdk-go-v2/credentials v1.13.36 h1:ps0cPswZjpsOk6sLwG6fdXTzrYjCplgPEyG3OUbbdqE= -github.com/aws/aws-sdk-go-v2/credentials v1.13.36/go.mod h1:sY2phUzxbygoyDtTXhqi7GjGjCQ1S5a5Rj8u3ksBxCg= +github.com/aws/aws-sdk-go-v2/config v1.18.39 h1:oPVyh6fuu/u4OiW4qcuQyEtk7U7uuNBmHmJSLg1AJsQ= +github.com/aws/aws-sdk-go-v2/config v1.18.39/go.mod h1:+NH/ZigdPckFpgB1TRcRuWCB/Kbbvkxc/iNAKTq5RhE= +github.com/aws/aws-sdk-go-v2/credentials v1.13.37 h1:BvEdm09+ZEh2XtN+PVHPcYwKY3wIeB6pw7vPRM4M9/U= +github.com/aws/aws-sdk-go-v2/credentials v1.13.37/go.mod h1:ACLrdkd4CLZyXOghZ8IYumQbcooAcp2jo/s2xsFH8IM= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= @@ -125,8 +125,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKi github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 h1:2PylFCfKCEDv6PeSN09pC/VUiRd10wi1VfHG5FrW0/g= github.com/aws/aws-sdk-go-v2/service/sso v1.13.6/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5 h1:dnInJb4S0oy8aQuri1mV6ipLlnZPfnsDNB9BGO9PDNY= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 h1:pSB560BbVj9ZlJZF4WYj5zsytWHWKxg+NgyGV4B2L58= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 h1:CQBFElb0LS8RojMJlxRSo/HXipvTZW2S44Lt9Mk2aYQ= github.com/aws/aws-sdk-go-v2/service/sts v1.21.5/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= From e96c59a96d7cc0246d7835920d38a3cb377ac1fb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 20:33:41 +0000 Subject: [PATCH 062/187] docs: Update Changelog (#3021) * update changelog Signed-off-by: zachaller * re-trigger Signed-off-by: zachaller * re-trigger Signed-off-by: zachaller --------- Signed-off-by: zachaller Co-authored-by: zachaller Signed-off-by: Philip Clark --- CHANGELOG.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63bef5a828..403f5c2f5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,23 @@ + +## [v1.6.0](https://github.com/argoproj/argo-rollouts/compare/v1.6.0-rc1...v1.6.0) (2023-09-05) + +### Chore + +* **deps:** bump github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 from 1.20.2 to 1.21.0 ([#2950](https://github.com/argoproj/argo-rollouts/issues/2950)) +* **deps:** bump github.com/antonmedv/expr from 1.12.7 to 1.13.0 ([#2951](https://github.com/argoproj/argo-rollouts/issues/2951)) + +### Docs + +* update supported k8s version ([#2949](https://github.com/argoproj/argo-rollouts/issues/2949)) + +### Fix + +* analysis step should be ignored after promote ([#3016](https://github.com/argoproj/argo-rollouts/issues/3016)) +* **controller:** rollback should skip all steps to active rs within RollbackWindow ([#2953](https://github.com/argoproj/argo-rollouts/issues/2953)) +* **controller:** typo fix ("Secrete" -> "Secret") in secret informer ([#2965](https://github.com/argoproj/argo-rollouts/issues/2965)) + + ## [v1.6.0-rc1](https://github.com/argoproj/argo-rollouts/compare/v1.5.1...v1.6.0-rc1) (2023-08-10) From 752d18c164f7b7f8e5d2984ad724fc03e21089c4 Mon Sep 17 00:00:00 2001 From: mitchell amihod Date: Wed, 6 Sep 2023 23:47:38 +0100 Subject: [PATCH 063/187] fix: Add the GOPATH to the go-to-protobuf command (#3022) Add the GOPATH to the go-to-protobuf command Signed-off-by: mitchell amihod <4623+meeech@users.noreply.github.com> Signed-off-by: Philip Clark --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 638498ff85..a5f77cc568 100644 --- a/Makefile +++ b/Makefile @@ -111,7 +111,7 @@ gen-proto: k8s-proto api-proto ui-proto # generates the .proto files affected by changes to types.go .PHONY: k8s-proto k8s-proto: go-mod-vendor $(TYPES) ## generate kubernetes protobuf files - PATH=${DIST_DIR}:$$PATH go-to-protobuf \ + PATH=${DIST_DIR}:$$PATH GOPATH=${GOPATH} go-to-protobuf \ --go-header-file=./hack/custom-boilerplate.go.txt \ --packages=github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1 \ --apimachinery-packages=${APIMACHINERY_PKGS} \ From 2005c170c47bcdbd256927b1418198038b72a054 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 14:05:27 -0500 Subject: [PATCH 064/187] chore(deps): bump github.com/antonmedv/expr from 1.13.0 to 1.15.1 (#3024) Bumps [github.com/antonmedv/expr](https://github.com/antonmedv/expr) from 1.13.0 to 1.15.1. - [Release notes](https://github.com/antonmedv/expr/releases) - [Commits](https://github.com/antonmedv/expr/compare/v1.13.0...v1.15.1) --- updated-dependencies: - dependency-name: github.com/antonmedv/expr dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b28cebc838..f6a6d23766 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/argoproj/argo-rollouts go 1.20 require ( - github.com/antonmedv/expr v1.13.0 + github.com/antonmedv/expr v1.15.1 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 diff --git a/go.sum b/go.sum index daf8ad437a..8d488e8e03 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.13.0 h1:8YrTtlCzlOtXw+hpeCLDLL2uo0C0k6jmYpYTGws5c5w= -github.com/antonmedv/expr v1.13.0/go.mod h1:FPC8iWArxls7axbVLsW+kpg1mz29A1b2M6jt+hZfDkU= +github.com/antonmedv/expr v1.15.1 h1:mxeRIkH8GQJo4MRRFgp0ArlV4AA+0DmcJNXEsG70rGU= +github.com/antonmedv/expr v1.15.1/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= From fc7a5e9bd36aa96829d76a2227cf8071b589035a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 14:06:00 -0500 Subject: [PATCH 065/187] chore(deps): bump github.com/hashicorp/go-plugin from 1.5.0 to 1.5.1 (#3017) Bumps [github.com/hashicorp/go-plugin](https://github.com/hashicorp/go-plugin) from 1.5.0 to 1.5.1. - [Release notes](https://github.com/hashicorp/go-plugin/releases) - [Changelog](https://github.com/hashicorp/go-plugin/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/go-plugin/compare/v1.5.0...v1.5.1) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f6a6d23766..ebd7c64cc9 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.3 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/hashicorp/go-plugin v1.5.0 + github.com/hashicorp/go-plugin v1.5.1 github.com/influxdata/influxdb-client-go/v2 v2.12.3 github.com/juju/ansiterm v1.0.0 github.com/machinebox/graphql v0.2.2 diff --git a/go.sum b/go.sum index 8d488e8e03..3ae3862224 100644 --- a/go.sum +++ b/go.sum @@ -402,8 +402,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.14.1 h1:nQcJDQwIAGnmoUWp8ubocEX40cCml/17YkF6csQLReU= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-plugin v1.5.0 h1:g6Lj3USwF5LaB8HlvCxPjN2X4nFE08ko2BJNVpl7TIE= -github.com/hashicorp/go-plugin v1.5.0/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= +github.com/hashicorp/go-plugin v1.5.1 h1:oGm7cWBaYIp3lJpx1RUEfLWophprE2EV/KUeqBYo+6k= +github.com/hashicorp/go-plugin v1.5.1/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.1/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= From a559f2fad15fc15f8830f2dd2e052440dd91b4af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Sep 2023 12:03:56 -0500 Subject: [PATCH 066/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 from 1.21.3 to 1.21.4 (#3025) chore(deps): bump github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 Bumps [github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2](https://github.com/aws/aws-sdk-go-v2) from 1.21.3 to 1.21.4. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/efs/v1.21.3...service/efs/v1.21.4) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ebd7c64cc9..19cd37cbd8 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.21.0 github.com/aws/aws-sdk-go-v2/config v1.18.39 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 - github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3 + github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible github.com/bombsimon/logrusr/v4 v4.0.0 github.com/evanphx/json-patch/v5 v5.6.0 diff --git a/go.sum b/go.sum index 3ae3862224..23719b238a 100644 --- a/go.sum +++ b/go.sum @@ -119,8 +119,8 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 h1:GPUcE/Yq7Ur8YSUk6lVkoIMWnJN github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 h1:qULF+ElcvjjSEO1+z5x+TmKE9d4yTej7PfpJQPVvexY= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7/go.mod h1:1HKxVrj5wsKy/wb2v07vzTSd+YPV1sDsWxferwPK7PA= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3 h1:CAWMcMnRYCBaeMnycTwZs+0BcuepIMfyP3F0r1VfgPc= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 h1:2PylFCfKCEDv6PeSN09pC/VUiRd10wi1VfHG5FrW0/g= From 92436f05f31aec4b30ccd0b1855482fda64834a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:10:56 -0500 Subject: [PATCH 067/187] chore(deps): bump docker/setup-buildx-action from 2.10.0 to 3.0.0 (#3034) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.10.0 to 3.0.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/885d1462b80bc1c1c7f0b00334ad271f09369c55...f95db51fddba0c2d1ec667646a06c2ce06100226) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/image-reuse.yaml | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index c90b286b10..adcbe86473 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -79,7 +79,7 @@ jobs: cosign-release: 'v2.0.2' - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 - - uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0 + - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Setup tags for container image as a CSV type run: | diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6ac65d4be1..918958b729 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -99,7 +99,7 @@ jobs: uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0 + uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Generate release artifacts run: | From 9d4f0d91dae303d3f9cec90d3846551b9a1d2450 Mon Sep 17 00:00:00 2001 From: mitchell amihod Date: Fri, 8 Sep 2023 22:55:24 +0100 Subject: [PATCH 068/187] chore: Update users doc with CircleCI (#3028) Update users doc with CircleCI Signed-off-by: mitchell amihod <4623+meeech@users.noreply.github.com> Signed-off-by: Philip Clark --- USERS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/USERS.md b/USERS.md index 4094c152c3..4ad9fb29bf 100644 --- a/USERS.md +++ b/USERS.md @@ -9,6 +9,7 @@ Organizations below are **officially** using Argo Rollouts. Please send a PR wit 1. [Bucketplace](https://www.bucketplace.co.kr/) 1. [BukuKas](https://bukukas.co.id/) 1. [Calm](https://www.calm.com/) +1. [CircleCI](https://circleci.com/) 1. [Codefresh](https://codefresh.io/) 1. [Credit Karma](https://creditkarma.com/) 1. [DaoCloud](https://daocloud.io) From 0c1c8ecd25ae02afee1728e1aacb4fbf104e27ef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:11:35 -0500 Subject: [PATCH 069/187] chore(deps): bump docker/build-push-action from 4.1.1 to 5.0.0 (#3033) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.1.1 to 5.0.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/2eb1c1961a95fc15694676618e422e8ba1d63825...0565240e2d4ab88bba5387d719585280857ece09) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/image-reuse.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index adcbe86473..6c98cb9bfc 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -130,7 +130,7 @@ jobs: - name: Build and push container image id: image - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 #v4.1.1 + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 #v5.0.0 with: context: . platforms: ${{ inputs.platforms }} From 7cec80f23958015534ef51c40c6cf88be3ae1cbc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:10:00 -0500 Subject: [PATCH 070/187] chore(deps): bump github.com/antonmedv/expr from 1.15.1 to 1.15.2 (#3036) Bumps [github.com/antonmedv/expr](https://github.com/antonmedv/expr) from 1.15.1 to 1.15.2. - [Release notes](https://github.com/antonmedv/expr/releases) - [Commits](https://github.com/antonmedv/expr/compare/v1.15.1...v1.15.2) --- updated-dependencies: - dependency-name: github.com/antonmedv/expr dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 19cd37cbd8..e747a4983c 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/argoproj/argo-rollouts go 1.20 require ( - github.com/antonmedv/expr v1.15.1 + github.com/antonmedv/expr v1.15.2 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 diff --git a/go.sum b/go.sum index 23719b238a..da8d8cf479 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.1 h1:mxeRIkH8GQJo4MRRFgp0ArlV4AA+0DmcJNXEsG70rGU= -github.com/antonmedv/expr v1.15.1/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= +github.com/antonmedv/expr v1.15.2 h1:afFXpDWIC2n3bF+kTZE1JvFo+c34uaM3sTqh8z0xfdU= +github.com/antonmedv/expr v1.15.2/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= From 5de4a8f327eb7c028b64a564166740db3bbe4da8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:12:01 -0500 Subject: [PATCH 071/187] chore(deps): bump docker/metadata-action from 4 to 5 (#3032) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4 to 5. - [Release notes](https://github.com/docker/metadata-action/releases) - [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md) - [Commits](https://github.com/docker/metadata-action/compare/v4...v5) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/docker-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 1a51e2a485..c762c89c29 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -28,7 +28,7 @@ jobs: steps: - name: Docker meta (controller) id: controller-meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | quay.io/argoproj/argo-rollouts @@ -38,7 +38,7 @@ jobs: - name: Docker meta (plugin) id: plugin-meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | quay.io/argoproj/kubectl-argo-rollouts From 77d74515fb8a2df9ceaae7ee79b128cd914523d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:10:32 -0500 Subject: [PATCH 072/187] chore(deps): bump docker/login-action from 2.2.0 to 3.0.0 (#3035) Bumps [docker/login-action](https://github.com/docker/login-action) from 2.2.0 to 3.0.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/465a07811f14bebb1938fbed4728c6a1ff8901fc...343f7c4344506bcbf9b4de18042ae17996df046d) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/image-reuse.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index 341d328a2e..c90b286b10 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -106,7 +106,7 @@ jobs: echo 'EOF' >> $GITHUB_ENV - name: Login to Quay.io - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: registry: quay.io username: ${{ secrets.quay_username }} @@ -114,7 +114,7 @@ jobs: if: ${{ inputs.quay_image_name && inputs.push }} - name: Login to GitHub Container Registry - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: registry: ghcr.io username: ${{ secrets.ghcr_username }} @@ -122,7 +122,7 @@ jobs: if: ${{ inputs.ghcr_image_name && inputs.push }} - name: Login to dockerhub Container Registry - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: username: ${{ secrets.docker_username }} password: ${{ secrets.docker_password }} From fcd977c7c98fedd6f6d8cc4b03d8348fdaba2366 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:12:43 -0500 Subject: [PATCH 073/187] chore(deps): bump github.com/evanphx/json-patch/v5 from 5.6.0 to 5.7.0 (#3030) Bumps [github.com/evanphx/json-patch/v5](https://github.com/evanphx/json-patch) from 5.6.0 to 5.7.0. - [Release notes](https://github.com/evanphx/json-patch/releases) - [Commits](https://github.com/evanphx/json-patch/compare/v5.6.0...v5.7.0) --- updated-dependencies: - dependency-name: github.com/evanphx/json-patch/v5 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e747a4983c..1e6633fa29 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible github.com/bombsimon/logrusr/v4 v4.0.0 - github.com/evanphx/json-patch/v5 v5.6.0 + github.com/evanphx/json-patch/v5 v5.7.0 github.com/gogo/protobuf v1.3.2 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.3 diff --git a/go.sum b/go.sum index da8d8cf479..837eaee024 100644 --- a/go.sum +++ b/go.sum @@ -206,8 +206,8 @@ github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0 github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= +github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= From a09702954de650bd50ce9aa6dbb3b7c3032772c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:13:13 -0500 Subject: [PATCH 074/187] chore(deps): bump google.golang.org/grpc from 1.57.0 to 1.58.0 (#3023) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.57.0 to 1.58.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.57.0...v1.58.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 22 +++++++++++----------- go.sum | 40 +++++++++++++++++++++++----------------- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/go.mod b/go.mod index 1e6633fa29..d809ee3e2d 100644 --- a/go.mod +++ b/go.mod @@ -36,8 +36,8 @@ require ( github.com/stretchr/testify v1.8.4 github.com/tj/assert v0.0.3 github.com/valyala/fasttemplate v1.2.2 - google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 - google.golang.org/grpc v1.57.0 + google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 + google.golang.org/grpc v1.58.0 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.8 @@ -57,7 +57,7 @@ require ( ) require ( - cloud.google.com/go/compute v1.19.1 // indirect + cloud.google.com/go/compute v1.21.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.27 // indirect @@ -171,20 +171,20 @@ require ( github.com/whilp/git-urls v0.0.0-20191001220047-6db9661140c0 // indirect github.com/xlab/treeprint v1.1.0 // indirect go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect - golang.org/x/crypto v0.7.0 // indirect + golang.org/x/crypto v0.11.0 // indirect golang.org/x/mod v0.8.0 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect + golang.org/x/net v0.12.0 // indirect + golang.org/x/oauth2 v0.10.0 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/term v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.6.0 // indirect gomodules.xyz/envconfig v1.3.1-0.20190308184047-426f31af0d45 // indirect gomodules.xyz/notify v0.1.1 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect + google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/go.sum b/go.sum index 837eaee024..582dc24d37 100644 --- a/go.sum +++ b/go.sum @@ -19,8 +19,8 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.19.1 h1:am86mquDUgjGNWxiGn+5PGLbmgiWXlE/yNWpIpNvuXY= -cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= +cloud.google.com/go/compute v1.21.0 h1:JNBsyXVoOoNJtTQcnEY5uYpZIbeCTYIeDe0Xh1bySMk= +cloud.google.com/go/compute v1.21.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= @@ -739,8 +739,9 @@ golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220513210258-46612604a0f9/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -826,16 +827,18 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= +golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= +golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -849,7 +852,7 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -920,16 +923,18 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -942,8 +947,9 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1070,12 +1076,12 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 h1:9NWlQfY2ePejTmfwUH1OWwmznFa+0kKcHGPDvcPza9M= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 h1:m8v1xLLLzMe1m5P+gCTF8nJB9epwZQUBERm20Oy1poQ= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= +google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= +google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= +google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1091,8 +1097,8 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= -google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= +google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o= +google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From ae85449c8fd4bace44cb5aac5fc2a83231cdf264 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 12:12:13 -0500 Subject: [PATCH 075/187] chore(deps): bump google.golang.org/grpc from 1.58.0 to 1.58.2 (#3050) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.0 to 1.58.2. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.58.0...v1.58.2) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d809ee3e2d..0790b439cd 100644 --- a/go.mod +++ b/go.mod @@ -37,7 +37,7 @@ require ( github.com/tj/assert v0.0.3 github.com/valyala/fasttemplate v1.2.2 google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 - google.golang.org/grpc v1.58.0 + google.golang.org/grpc v1.58.2 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.8 diff --git a/go.sum b/go.sum index 582dc24d37..eac3a04904 100644 --- a/go.sum +++ b/go.sum @@ -1097,8 +1097,8 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o= -google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= +google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 453ed01b8a8f6ca1937d21bebae8ac05b26f180e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Sep 2023 21:01:10 -0500 Subject: [PATCH 076/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.39 to 1.18.41 (#3047) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.39 to 1.18.41. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.39...config/v1.18.41) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 0790b439cd..4e25eb3a57 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.39 + github.com/aws/aws-sdk-go-v2/config v1.18.41 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,15 +82,15 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.37 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.39 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect diff --git a/go.sum b/go.sum index eac3a04904..c3060a94b6 100644 --- a/go.sum +++ b/go.sum @@ -105,10 +105,10 @@ github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WN github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.39 h1:oPVyh6fuu/u4OiW4qcuQyEtk7U7uuNBmHmJSLg1AJsQ= -github.com/aws/aws-sdk-go-v2/config v1.18.39/go.mod h1:+NH/ZigdPckFpgB1TRcRuWCB/Kbbvkxc/iNAKTq5RhE= -github.com/aws/aws-sdk-go-v2/credentials v1.13.37 h1:BvEdm09+ZEh2XtN+PVHPcYwKY3wIeB6pw7vPRM4M9/U= -github.com/aws/aws-sdk-go-v2/credentials v1.13.37/go.mod h1:ACLrdkd4CLZyXOghZ8IYumQbcooAcp2jo/s2xsFH8IM= +github.com/aws/aws-sdk-go-v2/config v1.18.41 h1:Go7z97YDsBJVNAaL7pDPKB6LeHEsAkHmFe+CeK30fUQ= +github.com/aws/aws-sdk-go-v2/config v1.18.41/go.mod h1:+yR45+A0LIMKT8bWOKo90Hy9rSrovEmEKoPKLmmVec8= +github.com/aws/aws-sdk-go-v2/credentials v1.13.39 h1:UnwBXDIHKDaejSXaRzKR57IdGCizk+z1DEhnsFpus7Q= +github.com/aws/aws-sdk-go-v2/credentials v1.13.39/go.mod h1:OJ9P239A90TnglJEF3qofKiNeEM6PCV/m+aNGV5WC24= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= @@ -123,12 +123,12 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeo github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 h1:2PylFCfKCEDv6PeSN09pC/VUiRd10wi1VfHG5FrW0/g= -github.com/aws/aws-sdk-go-v2/service/sso v1.13.6/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 h1:pSB560BbVj9ZlJZF4WYj5zsytWHWKxg+NgyGV4B2L58= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= -github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 h1:CQBFElb0LS8RojMJlxRSo/HXipvTZW2S44Lt9Mk2aYQ= -github.com/aws/aws-sdk-go-v2/service/sts v1.21.5/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 h1:AR/hlTsCyk1CwlyKnPFvIMvnONydRjDDRT9OGb0i+/g= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 h1:UniOmlPJelksyP5dGjfRoFTmLDy4/o0HH1lK2Op7zC8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk= +github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= From a60129bda8ad4622e2917cedb449c51557f91e48 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Sep 2023 21:05:26 -0500 Subject: [PATCH 077/187] chore(deps): bump docker/setup-qemu-action from 2.2.0 to 3.0.0 (#3031) Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2.2.0 to 3.0.0. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/2b82ce82d56a2a04d2637cd93a637ae1b359c0a7...68827325e0b33c7199eb31dd4e31fbe9023e06e3) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/image-reuse.yaml | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index 6c98cb9bfc..eefb23923d 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -78,7 +78,7 @@ jobs: with: cosign-release: 'v2.0.2' - - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 + - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Setup tags for container image as a CSV type diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 918958b729..df9479da3f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -96,7 +96,7 @@ jobs: go-version: ${{ env.GOLANG_VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 + uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 From 6c2632efbf7f98808262b18db93ee69aa20f41c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Sep 2023 21:05:51 -0500 Subject: [PATCH 078/187] chore(deps): bump github.com/antonmedv/expr from 1.15.2 to 1.15.3 (#3046) Bumps [github.com/antonmedv/expr](https://github.com/antonmedv/expr) from 1.15.2 to 1.15.3. - [Release notes](https://github.com/antonmedv/expr/releases) - [Commits](https://github.com/antonmedv/expr/compare/v1.15.2...v1.15.3) --- updated-dependencies: - dependency-name: github.com/antonmedv/expr dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4e25eb3a57..7a6438616a 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/argoproj/argo-rollouts go 1.20 require ( - github.com/antonmedv/expr v1.15.2 + github.com/antonmedv/expr v1.15.3 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 diff --git a/go.sum b/go.sum index c3060a94b6..e5db982007 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.2 h1:afFXpDWIC2n3bF+kTZE1JvFo+c34uaM3sTqh8z0xfdU= -github.com/antonmedv/expr v1.15.2/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= +github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= +github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= From 51f0f58eaa53e5ddf05c6299a4e914a2876d4713 Mon Sep 17 00:00:00 2001 From: "Kostis (Codefresh)" <39800303+kostis-codefresh@users.noreply.github.com> Date: Mon, 25 Sep 2023 15:47:24 +0300 Subject: [PATCH 079/187] docs: clarify external clusters (#3058) Signed-off-by: Kostis (Codefresh) <39800303+kostis-codefresh@users.noreply.github.com> Signed-off-by: Philip Clark --- docs/FAQ.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/FAQ.md b/docs/FAQ.md index 8a0c921cc7..861e4b3a80 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -41,6 +41,10 @@ solution that does not follow the GitOps approach. Yes. A k8s cluster can run multiple replicas of Argo-rollouts controllers to achieve HA. To enable this feature, run the controller with `--leader-elect` flag and increase the number of replicas in the controller's deployment manifest. The implementation is based on the [k8s client-go's leaderelection package](https://pkg.go.dev/k8s.io/client-go/tools/leaderelection#section-documentation). This implementation is tolerant to *arbitrary clock skew* among replicas. The level of tolerance to skew rate can be configured by setting `--leader-election-lease-duration` and `--leader-election-renew-deadline` appropriately. Please refer to the [package documentation](https://pkg.go.dev/k8s.io/client-go/tools/leaderelection#pkg-overview) for details. +### Can we install Argo Rollouts centrally in a cluster and manage Rollout resources in external clusters? + +No you cannot do that (even though Argo CD can work that way). This is by design because the Rollout is a custom resource unknown to vanilla Kubernetes. You need the Rollout CRD as well as the controller in the deployment cluster (every cluster that will use workloads with Rollouts). + ## Rollouts ### Which deployment strategies does Argo Rollouts support? From 9e2019ce4ccdadca456e7c89812616c39b01ea88 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 07:42:45 -0500 Subject: [PATCH 080/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.41 to 1.18.42 (#3055) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.41 to 1.18.42. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.41...config/v1.18.42) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 7a6438616a..6fcf264f9c 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.41 + github.com/aws/aws-sdk-go-v2/config v1.18.42 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,14 +82,14 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.39 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.40 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect diff --git a/go.sum b/go.sum index e5db982007..f0a32df12b 100644 --- a/go.sum +++ b/go.sum @@ -105,28 +105,28 @@ github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WN github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.41 h1:Go7z97YDsBJVNAaL7pDPKB6LeHEsAkHmFe+CeK30fUQ= -github.com/aws/aws-sdk-go-v2/config v1.18.41/go.mod h1:+yR45+A0LIMKT8bWOKo90Hy9rSrovEmEKoPKLmmVec8= -github.com/aws/aws-sdk-go-v2/credentials v1.13.39 h1:UnwBXDIHKDaejSXaRzKR57IdGCizk+z1DEhnsFpus7Q= -github.com/aws/aws-sdk-go-v2/credentials v1.13.39/go.mod h1:OJ9P239A90TnglJEF3qofKiNeEM6PCV/m+aNGV5WC24= +github.com/aws/aws-sdk-go-v2/config v1.18.42 h1:28jHROB27xZwU0CB88giDSjz7M1Sba3olb5JBGwina8= +github.com/aws/aws-sdk-go-v2/config v1.18.42/go.mod h1:4AZM3nMMxwlG+eZlxvBKqwVbkDLlnN2a4UGTL6HjaZI= +github.com/aws/aws-sdk-go-v2/credentials v1.13.40 h1:s8yOkDh+5b1jUDhMBtngF6zKWLDs84chUk2Vk0c38Og= +github.com/aws/aws-sdk-go-v2/credentials v1.13.40/go.mod h1:VtEHVAAqDWASwdOqj/1huyT6uHbs5s8FUHfDQdky/Rs= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 h1:SijA0mgjV8E+8G45ltVHs0fvKpTj8xmZJ3VwhGKtUSI= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 h1:GPUcE/Yq7Ur8YSUk6lVkoIMWnJNO0HT18GUzCWCgCI0= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 h1:qULF+ElcvjjSEO1+z5x+TmKE9d4yTej7PfpJQPVvexY= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7/go.mod h1:1HKxVrj5wsKy/wb2v07vzTSd+YPV1sDsWxferwPK7PA= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 h1:AR/hlTsCyk1CwlyKnPFvIMvnONydRjDDRT9OGb0i+/g= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 h1:UniOmlPJelksyP5dGjfRoFTmLDy4/o0HH1lK2Op7zC8= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 h1:YkNzx1RLS0F5qdf9v1Q8Cuv9NXCL2TkosOxhzlUPV64= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.1/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk= github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= From d61bbfb7d483c5528df31fba01c8ac303f212646 Mon Sep 17 00:00:00 2001 From: Jesse Suen Date: Fri, 29 Sep 2023 15:01:46 -0700 Subject: [PATCH 081/187] fix: prevent hot loop when fully promoted rollout is aborted (#3064) * fix: prevent hot loop when fully promoted rollout is aborted Signed-off-by: Jesse Suen * test: change expectations of abort tests Signed-off-by: Jesse Suen --------- Signed-off-by: Jesse Suen Signed-off-by: Philip Clark --- experiments/controller_test.go | 6 ++-- experiments/experiment_test.go | 2 +- experiments/replicaset_test.go | 4 +-- rollout/analysis_test.go | 64 +++++++++++++++++----------------- rollout/bluegreen_test.go | 16 ++++----- rollout/canary_test.go | 51 +++++++++++++-------------- rollout/controller.go | 5 +++ rollout/controller_test.go | 4 +-- rollout/experiment_test.go | 14 ++++---- rollout/service_test.go | 4 +-- test/e2e/istio_test.go | 4 +-- 11 files changed, 89 insertions(+), 85 deletions(-) diff --git a/experiments/controller_test.go b/experiments/controller_test.go index 26587b6346..0103e03ce1 100644 --- a/experiments/controller_test.go +++ b/experiments/controller_test.go @@ -805,7 +805,7 @@ func TestAddInvalidSpec(t *testing.T) { "status":{ } }`, nil, cond) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } func TestKeepInvalidSpec(t *testing.T) { @@ -852,7 +852,7 @@ func TestUpdateInvalidSpec(t *testing.T) { "status":{ } }`, nil, cond) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } @@ -892,7 +892,7 @@ func TestRemoveInvalidSpec(t *testing.T) { "status":{ } }`, templateStatus, cond) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } func TestRun(t *testing.T) { diff --git a/experiments/experiment_test.go b/experiments/experiment_test.go index e047082cee..21fbeb530a 100644 --- a/experiments/experiment_test.go +++ b/experiments/experiment_test.go @@ -282,7 +282,7 @@ func TestSuccessAfterDurationPasses(t *testing.T) { "phase": "Successful" } }`, templateStatuses, cond) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } // TestDontRequeueWithoutDuration verifies we don't requeue if an experiment does not have diff --git a/experiments/replicaset_test.go b/experiments/replicaset_test.go index e4d1cdf231..030414f2df 100644 --- a/experiments/replicaset_test.go +++ b/experiments/replicaset_test.go @@ -42,7 +42,7 @@ func TestCreateMultipleRS(t *testing.T) { "status":{ } }`, templateStatus, cond) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } func TestCreateMissingRS(t *testing.T) { @@ -72,7 +72,7 @@ func TestCreateMissingRS(t *testing.T) { generateTemplatesStatus("bar", 0, 0, v1alpha1.TemplateStatusProgressing, now()), generateTemplatesStatus("baz", 0, 0, v1alpha1.TemplateStatusProgressing, now()), } - assert.Equal(t, calculatePatch(e, expectedPatch, templateStatuses, cond), patch) + assert.JSONEq(t, calculatePatch(e, expectedPatch, templateStatuses, cond), patch) } func TestTemplateHasMultipleRS(t *testing.T) { diff --git a/rollout/analysis_test.go b/rollout/analysis_test.go index f0313d7ea0..de9a5e1db3 100644 --- a/rollout/analysis_test.go +++ b/rollout/analysis_test.go @@ -180,7 +180,7 @@ func TestCreateBackgroundAnalysisRun(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) } func TestCreateBackgroundAnalysisRunWithTemplates(t *testing.T) { @@ -241,7 +241,7 @@ func TestCreateBackgroundAnalysisRunWithTemplates(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) } func TestCreateBackgroundAnalysisRunWithClusterTemplates(t *testing.T) { @@ -303,7 +303,7 @@ func TestCreateBackgroundAnalysisRunWithClusterTemplates(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) } func TestInvalidSpecMissingClusterTemplatesBackgroundAnalysis(t *testing.T) { @@ -339,7 +339,7 @@ func TestInvalidSpecMissingClusterTemplatesBackgroundAnalysis(t *testing.T) { expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, progressingCond, string(invalidSpecBytes), strings.ReplaceAll(errmsg, "\"", "\\\"")) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } func TestCreateBackgroundAnalysisRunWithClusterTemplatesAndTemplate(t *testing.T) { @@ -416,7 +416,7 @@ func TestCreateBackgroundAnalysisRunWithClusterTemplatesAndTemplate(t *testing.T } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) } // TestCreateAnalysisRunWithCollision ensures we will create an new analysis run with a new name @@ -487,7 +487,7 @@ func TestCreateAnalysisRunWithCollision(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedAR.Name)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedAR.Name)), patch) } // TestCreateAnalysisRunWithCollisionAndSemanticEquality will ensure we do not create an extra @@ -550,7 +550,7 @@ func TestCreateAnalysisRunWithCollisionAndSemanticEquality(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ar.Name)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ar.Name)), patch) } func TestCreateAnalysisRunOnAnalysisStep(t *testing.T) { @@ -611,7 +611,7 @@ func TestCreateAnalysisRunOnAnalysisStep(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) } func TestFailCreateStepAnalysisRunIfInvalidTemplateRef(t *testing.T) { @@ -653,7 +653,7 @@ func TestFailCreateStepAnalysisRunIfInvalidTemplateRef(t *testing.T) { expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, progressingCond, string(invalidSpecBytes), strings.ReplaceAll(errmsg, "\"", "\\\"")) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } func TestFailCreateBackgroundAnalysisRunIfInvalidTemplateRef(t *testing.T) { @@ -698,7 +698,7 @@ func TestFailCreateBackgroundAnalysisRunIfInvalidTemplateRef(t *testing.T) { expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, progressingCond, string(invalidSpecBytes), strings.ReplaceAll(errmsg, "\"", "\\\"")) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } func TestFailCreateBackgroundAnalysisRunIfMetricRepeated(t *testing.T) { @@ -745,7 +745,7 @@ func TestFailCreateBackgroundAnalysisRunIfMetricRepeated(t *testing.T) { expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, progressingCond, string(invalidSpecBytes), strings.ReplaceAll(errmsg, "\"", "\\\"")) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } func TestDoNothingWithAnalysisRunsWhileBackgroundAnalysisRunRunning(t *testing.T) { @@ -798,7 +798,7 @@ func TestDoNothingWithAnalysisRunsWhileBackgroundAnalysisRunRunning(t *testing.T patchIndex := f.expectPatchRolloutAction(r2) f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestDoNothingWhileStepBasedAnalysisRunRunning(t *testing.T) { @@ -847,7 +847,7 @@ func TestDoNothingWhileStepBasedAnalysisRunRunning(t *testing.T) { patchIndex := f.expectPatchRolloutAction(r2) f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestCancelOlderAnalysisRuns(t *testing.T) { @@ -915,7 +915,7 @@ func TestCancelOlderAnalysisRuns(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestDeleteAnalysisRunsWithNoMatchingRS(t *testing.T) { @@ -971,7 +971,7 @@ func TestDeleteAnalysisRunsWithNoMatchingRS(t *testing.T) { deletedAr := f.getDeletedAnalysisRun(deletedIndex) assert.Equal(t, deletedAr, arWithDiffPodHash.Name) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestDeleteAnalysisRunsAfterRSDelete(t *testing.T) { @@ -1083,7 +1083,7 @@ func TestIncrementStepAfterSuccessfulAnalysisRun(t *testing.T) { }` condition := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, rs2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition)), patch) } func TestPausedOnInconclusiveBackgroundAnalysisRun(t *testing.T) { @@ -1152,7 +1152,7 @@ func TestPausedOnInconclusiveBackgroundAnalysisRun(t *testing.T) { }` condition := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition, v1alpha1.PauseReasonInconclusiveAnalysis, now, v1alpha1.PauseReasonInconclusiveAnalysis)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition, v1alpha1.PauseReasonInconclusiveAnalysis, now, v1alpha1.PauseReasonInconclusiveAnalysis)), patch) } func TestPausedStepAfterInconclusiveAnalysisRun(t *testing.T) { @@ -1215,7 +1215,7 @@ func TestPausedStepAfterInconclusiveAnalysisRun(t *testing.T) { } }` condition := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition, v1alpha1.PauseReasonInconclusiveAnalysis, now, v1alpha1.PauseReasonInconclusiveAnalysis)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition, v1alpha1.PauseReasonInconclusiveAnalysis, now, v1alpha1.PauseReasonInconclusiveAnalysis)), patch) } func TestErrorConditionAfterErrorAnalysisRunStep(t *testing.T) { @@ -1282,7 +1282,7 @@ func TestErrorConditionAfterErrorAnalysisRunStep(t *testing.T) { errmsg := fmt.Sprintf(conditions.RolloutAbortedMessage, 2) + ": " + ar.Status.Message condition := generateConditionsPatch(true, conditions.RolloutAbortedReason, r2, false, errmsg, false) expectedPatch = fmt.Sprintf(expectedPatch, condition, now, errmsg) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestErrorConditionAfterErrorAnalysisRunBackground(t *testing.T) { @@ -1358,7 +1358,7 @@ func TestErrorConditionAfterErrorAnalysisRunBackground(t *testing.T) { condition := generateConditionsPatch(true, conditions.RolloutAbortedReason, r2, false, "", false) now := timeutil.Now().UTC().Format(time.RFC3339) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition, now, errmsg)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition, now, errmsg)), patch) } func TestCancelAnalysisRunsWhenAborted(t *testing.T) { @@ -1419,7 +1419,7 @@ func TestCancelAnalysisRunsWhenAborted(t *testing.T) { }` errmsg := fmt.Sprintf(conditions.RolloutAbortedMessage, 2) now := timeutil.Now().UTC().Format(time.RFC3339) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, newConditions, now, errmsg)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, newConditions, now, errmsg)), patch) } func TestCancelBackgroundAnalysisRunWhenRolloutIsCompleted(t *testing.T) { @@ -1521,7 +1521,7 @@ func TestDoNotCreateBackgroundAnalysisRunAfterInconclusiveRun(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestDoNotCreateBackgroundAnalysisRunOnNewCanaryRollout(t *testing.T) { @@ -1647,7 +1647,7 @@ func TestCreatePrePromotionAnalysisRun(t *testing.T) { } } }`, ar.Name) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } // TestDoNotCreatePrePromotionAnalysisProgressedRollout ensures a pre-promotion analysis is not created after a Rollout @@ -1771,7 +1771,7 @@ func TestDoNotCreatePrePromotionAnalysisRunOnNotReadyReplicaSet(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchRolloutIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestRolloutPrePromotionAnalysisBecomesInconclusive(t *testing.T) { @@ -1841,7 +1841,7 @@ func TestRolloutPrePromotionAnalysisBecomesInconclusive(t *testing.T) { } } }`, now, now) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestRolloutPrePromotionAnalysisSwitchServiceAfterSuccess(t *testing.T) { @@ -1905,7 +1905,7 @@ func TestRolloutPrePromotionAnalysisSwitchServiceAfterSuccess(t *testing.T) { "message": null } }`, rs2PodHash, rs2PodHash, rs2PodHash) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestRolloutPrePromotionAnalysisHonorAutoPromotionSeconds(t *testing.T) { @@ -1971,7 +1971,7 @@ func TestRolloutPrePromotionAnalysisHonorAutoPromotionSeconds(t *testing.T) { "message": null } }`, rs2PodHash, rs2PodHash, rs2PodHash) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestRolloutPrePromotionAnalysisDoNothingOnInconclusiveAnalysis(t *testing.T) { @@ -2096,7 +2096,7 @@ func TestAbortRolloutOnErrorPrePromotionAnalysis(t *testing.T) { now := timeutil.MetaNow().UTC().Format(time.RFC3339) progressingFalseAborted, _ := newProgressingCondition(conditions.RolloutAbortedReason, r2, "") newConditions := updateConditionsPatch(*r2, progressingFalseAborted) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, now, newConditions, conditions.RolloutAbortedReason, progressingFalseAborted.Message)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, now, newConditions, conditions.RolloutAbortedReason, progressingFalseAborted.Message)), patch) } func TestCreatePostPromotionAnalysisRun(t *testing.T) { @@ -2143,7 +2143,7 @@ func TestCreatePostPromotionAnalysisRun(t *testing.T) { } } }`, ar.Name) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestRolloutPostPromotionAnalysisSuccess(t *testing.T) { @@ -2199,7 +2199,7 @@ func TestRolloutPostPromotionAnalysisSuccess(t *testing.T) { "message": null } }`, rs2PodHash) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } // TestPostPromotionAnalysisRunHandleInconclusive ensures that the Rollout does not scale down a old ReplicaSet if @@ -2264,7 +2264,7 @@ func TestPostPromotionAnalysisRunHandleInconclusive(t *testing.T) { "message": "InconclusiveAnalysisRun" } }`) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestAbortRolloutOnErrorPostPromotionAnalysis(t *testing.T) { @@ -2334,7 +2334,7 @@ func TestAbortRolloutOnErrorPostPromotionAnalysis(t *testing.T) { now := timeutil.MetaNow().UTC().Format(time.RFC3339) progressingFalseAborted, _ := newProgressingCondition(conditions.RolloutAbortedReason, r2, "") newConditions := updateConditionsPatch(*r2, progressingFalseAborted) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, now, newConditions, conditions.RolloutAbortedReason, progressingFalseAborted.Message)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, now, newConditions, conditions.RolloutAbortedReason, progressingFalseAborted.Message)), patch) } func TestCreateAnalysisRunWithCustomAnalysisRunMetadataAndROCopyLabels(t *testing.T) { diff --git a/rollout/bluegreen_test.go b/rollout/bluegreen_test.go index 42b521a565..cff894e8ca 100644 --- a/rollout/bluegreen_test.go +++ b/rollout/bluegreen_test.go @@ -290,7 +290,7 @@ func TestBlueGreenHandlePause(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchRolloutIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) }) t.Run("AddPause", func(t *testing.T) { f := newFixture(t) @@ -334,7 +334,7 @@ func TestBlueGreenHandlePause(t *testing.T) { } }` now := timeutil.Now().UTC().Format(time.RFC3339) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, v1alpha1.PauseReasonBlueGreenPause, now)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, v1alpha1.PauseReasonBlueGreenPause, now)), patch) }) @@ -376,7 +376,7 @@ func TestBlueGreenHandlePause(t *testing.T) { } }` addedConditions := generateConditionsPatchWithPause(true, conditions.RolloutPausedReason, rs2, true, "", true, false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, addedConditions)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, addedConditions)), patch) }) t.Run("NoActionsAfterPausing", func(t *testing.T) { @@ -417,7 +417,7 @@ func TestBlueGreenHandlePause(t *testing.T) { patchIndex := f.expectPatchRolloutActionWithPatch(r2, OnlyObservedGenerationPatch) f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) }) t.Run("NoActionsAfterPausedOnInconclusiveRun", func(t *testing.T) { @@ -468,7 +468,7 @@ func TestBlueGreenHandlePause(t *testing.T) { patchIndex := f.expectPatchRolloutActionWithPatch(r2, OnlyObservedGenerationPatch) f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) }) t.Run("NoAutoPromoteBeforeDelayTimePasses", func(t *testing.T) { @@ -509,7 +509,7 @@ func TestBlueGreenHandlePause(t *testing.T) { patchIndex := f.expectPatchRolloutActionWithPatch(r2, OnlyObservedGenerationPatch) f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) }) t.Run("AutoPromoteAfterDelayTimePasses", func(t *testing.T) { @@ -813,7 +813,7 @@ func TestBlueGreenHandlePause(t *testing.T) { "conditions": %s } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedUnpausePatch, unpauseConditions)), unpausePatch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedUnpausePatch, unpauseConditions)), unpausePatch) generatedConditions := generateConditionsPatchWithCompleted(true, conditions.ReplicaSetUpdatedReason, rs2, true, "", true) expected2ndPatchWithoutSubs := `{ @@ -1453,7 +1453,7 @@ func TestBlueGreenAbort(t *testing.T) { } }`, rs1PodHash, expectedConditions, rs1PodHash, conditions.RolloutAbortedReason, fmt.Sprintf(conditions.RolloutAbortedMessage, 2)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestBlueGreenHandlePauseAutoPromoteWithConditions(t *testing.T) { diff --git a/rollout/canary_test.go b/rollout/canary_test.go index e3bffff2dd..4adca3fcb9 100644 --- a/rollout/canary_test.go +++ b/rollout/canary_test.go @@ -182,7 +182,7 @@ func TestCanaryRolloutEnterPauseState(t *testing.T) { now := timeutil.MetaNow().UTC().Format(time.RFC3339) expectedPatchWithoutObservedGen := fmt.Sprintf(expectedPatchTemplate, v1alpha1.PauseReasonCanaryPauseStep, now, conditions, v1alpha1.PauseReasonCanaryPauseStep) expectedPatch := calculatePatch(r2, expectedPatchWithoutObservedGen) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } func TestCanaryRolloutNoProgressWhilePaused(t *testing.T) { @@ -257,7 +257,7 @@ func TestCanaryRolloutUpdatePauseConditionWhilePaused(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRollout(addPausedConditionPatch) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestCanaryRolloutResetProgressDeadlineOnRetry(t *testing.T) { @@ -300,7 +300,7 @@ func TestCanaryRolloutResetProgressDeadlineOnRetry(t *testing.T) { "message": "more replicas need to be updated" } }`, retryCondition) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestCanaryRolloutIncrementStepAfterUnPaused(t *testing.T) { @@ -342,7 +342,7 @@ func TestCanaryRolloutIncrementStepAfterUnPaused(t *testing.T) { }` generatedConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, rs2, false, "", false) expectedPatch := calculatePatch(r2, fmt.Sprintf(expectedPatchTemplate, generatedConditions)) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } func TestCanaryRolloutUpdateStatusWhenAtEndOfSteps(t *testing.T) { @@ -383,7 +383,7 @@ func TestCanaryRolloutUpdateStatusWhenAtEndOfSteps(t *testing.T) { }` expectedPatch := fmt.Sprintf(expectedPatchWithoutStableRS, expectedStableRS, generateConditionsPatchWithCompleted(true, conditions.ReplicaSetUpdatedReason, rs2, false, "", true)) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestResetCurrentStepIndexOnStepChange(t *testing.T) { @@ -426,7 +426,7 @@ func TestResetCurrentStepIndexOnStepChange(t *testing.T) { }` newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) expectedPatch := fmt.Sprintf(expectedPatchWithoutPodHash, expectedCurrentPodHash, expectedCurrentStepHash, newConditions) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestResetCurrentStepIndexOnPodSpecChange(t *testing.T) { @@ -467,7 +467,7 @@ func TestResetCurrentStepIndexOnPodSpecChange(t *testing.T) { newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) expectedPatch := fmt.Sprintf(expectedPatchWithoutPodHash, expectedCurrentPodHash, newConditions) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestCanaryRolloutCreateFirstReplicasetNoSteps(t *testing.T) { @@ -505,7 +505,7 @@ func TestCanaryRolloutCreateFirstReplicasetNoSteps(t *testing.T) { newConditions := generateConditionsPatchWithCompleted(false, conditions.ReplicaSetUpdatedReason, rs, false, "", true) - assert.Equal(t, calculatePatch(r, fmt.Sprintf(expectedPatch, newConditions)), patch) + assert.JSONEq(t, calculatePatch(r, fmt.Sprintf(expectedPatch, newConditions)), patch) } func TestCanaryRolloutCreateFirstReplicasetWithSteps(t *testing.T) { @@ -545,7 +545,7 @@ func TestCanaryRolloutCreateFirstReplicasetWithSteps(t *testing.T) { }` expectedPatch := fmt.Sprintf(expectedPatchWithSub, generateConditionsPatchWithCompleted(false, conditions.ReplicaSetUpdatedReason, rs, false, "", true)) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } func TestCanaryRolloutCreateNewReplicaWithCorrectWeight(t *testing.T) { @@ -843,7 +843,7 @@ func TestRollBackToStable(t *testing.T) { newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, rs1, false, "", true) expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, hash.ComputePodTemplateHash(&r2.Spec.Template, r2.Status.CollisionCount), newConditions) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestRollBackToActiveReplicaSetWithinWindow(t *testing.T) { @@ -935,7 +935,7 @@ func TestGradualShiftToNewStable(t *testing.T) { newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, newConditions) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestRollBackToStableAndStepChange(t *testing.T) { @@ -983,7 +983,7 @@ func TestRollBackToStableAndStepChange(t *testing.T) { newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, rs1, false, "", true) expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, newPodHash, newStepHash, newConditions) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestCanaryRolloutIncrementStepIfSetWeightsAreCorrect(t *testing.T) { @@ -1019,7 +1019,7 @@ func TestCanaryRolloutIncrementStepIfSetWeightsAreCorrect(t *testing.T) { } }` newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, rs3, false, "", false) - assert.Equal(t, calculatePatch(r3, fmt.Sprintf(expectedPatch, newConditions)), patch) + assert.JSONEq(t, calculatePatch(r3, fmt.Sprintf(expectedPatch, newConditions)), patch) } func TestSyncRolloutWaitAddToQueue(t *testing.T) { @@ -1171,7 +1171,7 @@ func TestSyncRolloutWaitIncrementStepIndex(t *testing.T) { "currentStepIndex":2 } }` - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestCanaryRolloutStatusHPAStatusFields(t *testing.T) { @@ -1215,7 +1215,7 @@ func TestCanaryRolloutStatusHPAStatusFields(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRolloutWithoutConditions(index) - assert.Equal(t, calculatePatch(r2, expectedPatchWithSub), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatchWithSub), patch) } func TestCanaryRolloutWithCanaryService(t *testing.T) { @@ -1656,7 +1656,7 @@ func TestCanaryRolloutScaleWhilePaused(t *testing.T) { patch := f.getPatchedRolloutWithoutConditions(patchIndex) expectedPatch := calculatePatch(r2, OnlyObservedGenerationPatch) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } func TestResumeRolloutAfterPauseDuration(t *testing.T) { @@ -1756,7 +1756,7 @@ func TestNoResumeAfterPauseDurationIfUserPaused(t *testing.T) { "message": "manually paused" } }` - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestHandleNilNewRSOnScaleAndImageChange(t *testing.T) { @@ -1803,7 +1803,7 @@ func TestHandleNilNewRSOnScaleAndImageChange(t *testing.T) { patchIndex := f.expectPatchRolloutAction(r2) f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestHandleCanaryAbort(t *testing.T) { @@ -1850,10 +1850,10 @@ func TestHandleCanaryAbort(t *testing.T) { }` errmsg := fmt.Sprintf(conditions.RolloutAbortedMessage, 2) newConditions := generateConditionsPatch(true, conditions.RolloutAbortedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, newConditions, conditions.RolloutAbortedReason, errmsg)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, newConditions, conditions.RolloutAbortedReason, errmsg)), patch) }) - t.Run("Do not reset currentStepCount if newRS is stableRS", func(t *testing.T) { + t.Run("Do not reset currentStepCount and reset abort if newRS is stableRS", func(t *testing.T) { f := newFixture(t) defer f.Close() @@ -1881,13 +1881,12 @@ func TestHandleCanaryAbort(t *testing.T) { patch := f.getPatchedRollout(patchIndex) expectedPatch := `{ "status":{ - "conditions": %s, - "phase": "Degraded", - "message": "%s: %s" + "abort": null, + "abortedAt": null, + "conditions": %s } }` - errmsg := fmt.Sprintf(conditions.RolloutAbortedMessage, 1) - newConditions := generateConditionsPatch(true, conditions.RolloutAbortedReason, r1, false, "", true) - assert.Equal(t, calculatePatch(r1, fmt.Sprintf(expectedPatch, newConditions, conditions.RolloutAbortedReason, errmsg)), patch) + newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r1, false, "", true) + assert.JSONEq(t, calculatePatch(r1, fmt.Sprintf(expectedPatch, newConditions)), patch) }) } diff --git a/rollout/controller.go b/rollout/controller.go index 5824512271..ebc17c1303 100644 --- a/rollout/controller.go +++ b/rollout/controller.go @@ -56,6 +56,7 @@ import ( logutil "github.com/argoproj/argo-rollouts/utils/log" "github.com/argoproj/argo-rollouts/utils/record" replicasetutil "github.com/argoproj/argo-rollouts/utils/replicaset" + rolloututil "github.com/argoproj/argo-rollouts/utils/rollout" serviceutil "github.com/argoproj/argo-rollouts/utils/service" timeutil "github.com/argoproj/argo-rollouts/utils/time" unstructuredutil "github.com/argoproj/argo-rollouts/utils/unstructured" @@ -520,6 +521,10 @@ func (c *Controller) newRolloutContext(rollout *v1alpha1.Rollout) (*rolloutConte }, reconcilerBase: c.reconcilerBase, } + if rolloututil.IsFullyPromoted(rollout) && roCtx.pauseContext.IsAborted() { + logCtx.Warnf("Removing abort condition from fully promoted rollout") + roCtx.pauseContext.RemoveAbort() + } // carry over existing recorded weights roCtx.newStatus.Canary.Weights = rollout.Status.Canary.Weights return &roCtx, nil diff --git a/rollout/controller_test.go b/rollout/controller_test.go index d37cdc24cd..a637d68f29 100644 --- a/rollout/controller_test.go +++ b/rollout/controller_test.go @@ -1346,7 +1346,7 @@ func TestSwitchInvalidSpecMessage(t *testing.T) { expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, progressingCond, string(invalidSpecBytes), conditions.InvalidSpecReason, strings.ReplaceAll(errmsg, "\"", "\\\"")) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } // TestPodTemplateHashEquivalence verifies the hash is computed consistently when there are slight @@ -1549,7 +1549,7 @@ func TestSwitchBlueGreenToCanary(t *testing.T) { "selector": "foo=bar" } }`, addedConditions, conditions.ComputeStepHash(r)) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } func newInvalidSpecCondition(reason string, resourceObj runtime.Object, optionalMessage string) (v1alpha1.RolloutCondition, string) { diff --git a/rollout/experiment_test.go b/rollout/experiment_test.go index bcd10cad92..233dd16ca5 100644 --- a/rollout/experiment_test.go +++ b/rollout/experiment_test.go @@ -69,7 +69,7 @@ func TestRolloutCreateExperiment(t *testing.T) { } }` conds := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ex.Name, conds)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ex.Name, conds)), patch) } func TestRolloutCreateClusterTemplateExperiment(t *testing.T) { @@ -126,7 +126,7 @@ func TestRolloutCreateClusterTemplateExperiment(t *testing.T) { } }` conds := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ex.Name, conds)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ex.Name, conds)), patch) } func TestCreateExperimentWithCollision(t *testing.T) { @@ -178,7 +178,7 @@ func TestCreateExperimentWithCollision(t *testing.T) { } }` conds := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, createdEx.Name, conds)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, createdEx.Name, conds)), patch) } func TestCreateExperimentWithCollisionAndSemanticEquality(t *testing.T) { @@ -229,7 +229,7 @@ func TestCreateExperimentWithCollisionAndSemanticEquality(t *testing.T) { } }` conds := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ex.Name, conds)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ex.Name, conds)), patch) } func TestRolloutExperimentProcessingDoNothing(t *testing.T) { @@ -267,7 +267,7 @@ func TestRolloutExperimentProcessingDoNothing(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } @@ -314,7 +314,7 @@ func TestAbortRolloutAfterFailedExperiment(t *testing.T) { }` now := timeutil.Now().UTC().Format(time.RFC3339) generatedConditions := generateConditionsPatch(true, conditions.RolloutAbortedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, now, generatedConditions, conditions.RolloutAbortedReason, fmt.Sprintf(conditions.RolloutAbortedMessage, 2))), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, now, generatedConditions, conditions.RolloutAbortedReason, fmt.Sprintf(conditions.RolloutAbortedMessage, 2))), patch) } func TestPauseRolloutAfterInconclusiveExperiment(t *testing.T) { @@ -481,7 +481,7 @@ func TestRolloutExperimentFinishedIncrementStep(t *testing.T) { }` generatedConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, rs2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, generatedConditions)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, generatedConditions)), patch) } func TestRolloutDoNotCreateExperimentWithoutStableRS(t *testing.T) { diff --git a/rollout/service_test.go b/rollout/service_test.go index 393faf87a0..e29ee53b4a 100644 --- a/rollout/service_test.go +++ b/rollout/service_test.go @@ -144,7 +144,7 @@ func TestActiveServiceNotFound(t *testing.T) { } }` _, pausedCondition := newInvalidSpecCondition(conditions.InvalidSpecReason, notUsedActiveSvc, errmsg) - assert.Equal(t, calculatePatch(r, fmt.Sprintf(expectedPatch, pausedCondition, conditions.InvalidSpecReason, strings.ReplaceAll(errmsg, "\"", "\\\""))), patch) + assert.JSONEq(t, calculatePatch(r, fmt.Sprintf(expectedPatch, pausedCondition, conditions.InvalidSpecReason, strings.ReplaceAll(errmsg, "\"", "\\\""))), patch) } func TestPreviewServiceNotFound(t *testing.T) { @@ -173,7 +173,7 @@ func TestPreviewServiceNotFound(t *testing.T) { } }` _, pausedCondition := newInvalidSpecCondition(conditions.InvalidSpecReason, notUsedPreviewSvc, errmsg) - assert.Equal(t, calculatePatch(r, fmt.Sprintf(expectedPatch, pausedCondition, conditions.InvalidSpecReason, strings.ReplaceAll(errmsg, "\"", "\\\""))), patch) + assert.JSONEq(t, calculatePatch(r, fmt.Sprintf(expectedPatch, pausedCondition, conditions.InvalidSpecReason, strings.ReplaceAll(errmsg, "\"", "\\\""))), patch) } diff --git a/test/e2e/istio_test.go b/test/e2e/istio_test.go index 2f993f09bc..7ecbd66fdf 100644 --- a/test/e2e/istio_test.go +++ b/test/e2e/istio_test.go @@ -303,7 +303,7 @@ func (s *IstioSuite) TestIstioAbortUpdate() { Then(). When(). AbortRollout(). - WaitForRolloutStatus("Degraded"). + WaitForRolloutStatus("Healthy"). Then(). ExpectRevisionPodCount("1", 1). When(). @@ -316,7 +316,7 @@ func (s *IstioSuite) TestIstioAbortUpdate() { Then(). When(). AbortRollout(). - WaitForRolloutStatus("Degraded"). + WaitForRolloutStatus("Healthy"). Then(). ExpectRevisionPodCount("2", 1) } From 02a4b2728deaccf8fe13946bc284fa5ec7e2dbec Mon Sep 17 00:00:00 2001 From: Zubair Haque Date: Mon, 2 Oct 2023 16:37:30 -0500 Subject: [PATCH 082/187] chore: updating getCanaryConfigId to be more efficient with better error handling (#3070) updating getCanaryConfigId to be more efficient with better error handling Signed-off-by: zhaque44 Signed-off-by: Philip Clark --- metricproviders/kayenta/kayenta.go | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/metricproviders/kayenta/kayenta.go b/metricproviders/kayenta/kayenta.go index 79f47c5f28..b623aa7730 100644 --- a/metricproviders/kayenta/kayenta.go +++ b/metricproviders/kayenta/kayenta.go @@ -67,26 +67,20 @@ func (p *Provider) GetMetadata(metric v1alpha1.Metric) map[string]string { } func getCanaryConfigId(metric v1alpha1.Metric, p *Provider) (string, error) { - configIdLookupURL := fmt.Sprintf(configIdLookupURLFormat, metric.Provider.Kayenta.Address, metric.Provider.Kayenta.Application, metric.Provider.Kayenta.StorageAccountName) response, err := p.client.Get(configIdLookupURL) - if err != nil || response.Body == nil || response.StatusCode != 200 { - if err == nil { - err = errors.New("Invalid Response") - } + if err != nil { return "", err } + defer response.Body.Close() - data, err := io.ReadAll(response.Body) - if err != nil { - return "", err + if response.StatusCode != 200 { + return "", fmt.Errorf("Invalid Response: HTTP %d", response.StatusCode) } var cc []canaryConfig - - err = json.Unmarshal(data, &cc) - if err != nil { + if err := json.NewDecoder(response.Body).Decode(&cc); err != nil { return "", err } @@ -96,7 +90,7 @@ func getCanaryConfigId(metric v1alpha1.Metric, p *Provider) (string, error) { } } - return "", err + return "", errors.New("Canary config not found") } // Run queries kayentd for the metric From 966e9489d19d0994d356e5b9eba46cba692275d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:37:52 -0500 Subject: [PATCH 083/187] chore(deps): bump github.com/hashicorp/go-plugin from 1.5.1 to 1.5.2 (#3056) Bumps [github.com/hashicorp/go-plugin](https://github.com/hashicorp/go-plugin) from 1.5.1 to 1.5.2. - [Release notes](https://github.com/hashicorp/go-plugin/releases) - [Changelog](https://github.com/hashicorp/go-plugin/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/go-plugin/compare/v1.5.1...v1.5.2) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6fcf264f9c..25a4d14444 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.3 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/hashicorp/go-plugin v1.5.1 + github.com/hashicorp/go-plugin v1.5.2 github.com/influxdata/influxdb-client-go/v2 v2.12.3 github.com/juju/ansiterm v1.0.0 github.com/machinebox/graphql v0.2.2 diff --git a/go.sum b/go.sum index f0a32df12b..8b00f1d6f5 100644 --- a/go.sum +++ b/go.sum @@ -402,8 +402,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.14.1 h1:nQcJDQwIAGnmoUWp8ubocEX40cCml/17YkF6csQLReU= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-plugin v1.5.1 h1:oGm7cWBaYIp3lJpx1RUEfLWophprE2EV/KUeqBYo+6k= -github.com/hashicorp/go-plugin v1.5.1/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.1/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= From 07a6c21eaa04deb7f04c7b509a85ca91a858b537 Mon Sep 17 00:00:00 2001 From: Jesse Suen Date: Wed, 4 Oct 2023 06:14:01 -0700 Subject: [PATCH 084/187] fix: inopportune scaling events would lose some status fields (#3060) fix: inopportune scaling events would result in loss of data Signed-off-by: Jesse Suen Signed-off-by: Philip Clark --- rollout/sync.go | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/rollout/sync.go b/rollout/sync.go index 98990b4596..f13a3489c7 100644 --- a/rollout/sync.go +++ b/rollout/sync.go @@ -274,10 +274,11 @@ func (c *rolloutContext) syncReplicasOnly() error { if err != nil { return err } + newStatus := c.rollout.Status.DeepCopy() // NOTE: it is possible for newRS to be nil (e.g. when template and replicas changed at same time) if c.rollout.Spec.Strategy.BlueGreen != nil { - previewSvc, activeSvc, err := c.getPreviewAndActiveServices() + _, activeSvc, err := c.getPreviewAndActiveServices() if err != nil { return nil } @@ -286,7 +287,15 @@ func (c *rolloutContext) syncReplicasOnly() error { // so we can abort this resync return err } - return c.syncRolloutStatusBlueGreen(previewSvc, activeSvc) + activeRS, _ := replicasetutil.GetReplicaSetByTemplateHash(c.allRSs, newStatus.BlueGreen.ActiveSelector) + if activeRS != nil { + newStatus.HPAReplicas = activeRS.Status.Replicas + newStatus.AvailableReplicas = activeRS.Status.AvailableReplicas + } else { + // when we do not have an active replicaset, accounting is done on the default rollout selector + newStatus.HPAReplicas = replicasetutil.GetActualReplicaCountForReplicaSets(c.allRSs) + newStatus.AvailableReplicas = replicasetutil.GetAvailableReplicaCountForReplicaSets(c.allRSs) + } } // The controller wants to use the rolloutCanary method to reconcile the rollout if the rollout is not paused. // If there are no scaling events, the rollout should only sync its status @@ -296,9 +305,10 @@ func (c *rolloutContext) syncReplicasOnly() error { // so we can abort this resync return err } - return c.syncRolloutStatusCanary() + newStatus.AvailableReplicas = replicasetutil.GetAvailableReplicaCountForReplicaSets(c.allRSs) + newStatus.HPAReplicas = replicasetutil.GetActualReplicaCountForReplicaSets(c.allRSs) } - return fmt.Errorf("no rollout strategy provided") + return c.persistRolloutStatus(newStatus) } // isScalingEvent checks whether the provided rollout has been updated with a scaling event From 5aafe4d839ad57ae264e8623a2e6fa897ef7f5d4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 08:14:24 -0500 Subject: [PATCH 085/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.42 to 1.18.43 (#3072) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.42 to 1.18.43. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.42...config/v1.18.43) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 25a4d14444..8e9b03f62b 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.42 + github.com/aws/aws-sdk-go-v2/config v1.18.43 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,15 +82,15 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.40 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.41 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect diff --git a/go.sum b/go.sum index 8b00f1d6f5..764feeed8d 100644 --- a/go.sum +++ b/go.sum @@ -105,10 +105,10 @@ github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WN github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.42 h1:28jHROB27xZwU0CB88giDSjz7M1Sba3olb5JBGwina8= -github.com/aws/aws-sdk-go-v2/config v1.18.42/go.mod h1:4AZM3nMMxwlG+eZlxvBKqwVbkDLlnN2a4UGTL6HjaZI= -github.com/aws/aws-sdk-go-v2/credentials v1.13.40 h1:s8yOkDh+5b1jUDhMBtngF6zKWLDs84chUk2Vk0c38Og= -github.com/aws/aws-sdk-go-v2/credentials v1.13.40/go.mod h1:VtEHVAAqDWASwdOqj/1huyT6uHbs5s8FUHfDQdky/Rs= +github.com/aws/aws-sdk-go-v2/config v1.18.43 h1:IgdUtTRvUDC6eiJBqU6vh7bHFNAEBjQ8S+qJ7zVhDOs= +github.com/aws/aws-sdk-go-v2/config v1.18.43/go.mod h1:NiFev8qlgg8MPzw3fO/EwzMZeZwlJEKGwfpjRPA9Nvw= +github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9rmEzEhbZFh9JQW/Bg= +github.com/aws/aws-sdk-go-v2/credentials v1.13.41/go.mod h1:cc3Fn7DkKbJalPtQnudHGZZ8ml9+hwtbc1CJONsYYqk= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= @@ -123,12 +123,12 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeo github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 h1:YkNzx1RLS0F5qdf9v1Q8Cuv9NXCL2TkosOxhzlUPV64= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.1/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 h1:vuGK1vHNP9zx0PfOrtPumbwR2af0ATQ1Z2H6p75AgRQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= -github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk= -github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= From e3c61f4c282cfa0594cc4c1526a04d9e0bd0d0b2 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Thu, 5 Oct 2023 08:14:05 -0600 Subject: [PATCH 086/187] fix: sync notification controller configmaps/secrets first (#3075) sync notification controller configmaps/secrets first before starting other informers Signed-off-by: zachaller Signed-off-by: Philip Clark --- controller/controller.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/controller/controller.go b/controller/controller.go index 5429cfe743..afe4bc769b 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -463,6 +463,12 @@ func (c *Manager) startLeading(ctx context.Context, rolloutThreadiness, serviceT // Start the informer factories to begin populating the informer caches log.Info("Starting Controllers") + c.notificationConfigMapInformerFactory.Start(ctx.Done()) + c.notificationSecretInformerFactory.Start(ctx.Done()) + if ok := cache.WaitForCacheSync(ctx.Done(), c.configMapSynced, c.secretSynced); !ok { + log.Fatalf("failed to wait for configmap/secret caches to sync, exiting") + } + // notice that there is no need to run Start methods in a separate goroutine. (i.e. go kubeInformerFactory.Start(stopCh) // Start method is non-blocking and runs all registered informers in a dedicated goroutine. c.dynamicInformerFactory.Start(ctx.Done()) @@ -471,9 +477,6 @@ func (c *Manager) startLeading(ctx context.Context, rolloutThreadiness, serviceT } c.kubeInformerFactory.Start(ctx.Done()) - c.notificationConfigMapInformerFactory.Start(ctx.Done()) - c.notificationSecretInformerFactory.Start(ctx.Done()) - c.jobInformerFactory.Start(ctx.Done()) // Check if Istio installed on cluster before starting dynamicInformerFactory From e48d7aef419ce291e6709e325af868ed94379718 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Thu, 5 Oct 2023 10:30:50 -0600 Subject: [PATCH 087/187] fix: missing notification on error (#3076) * fix: missing notification on error Signed-off-by: zachaller * fix tests Signed-off-by: zachaller * aggregate errors Signed-off-by: zachaller * fix bad stat counts Signed-off-by: zachaller * return errors Signed-off-by: zachaller * fix tests on return of errors Signed-off-by: zachaller * change case on logs Signed-off-by: zachaller * missed a case Signed-off-by: zachaller --------- Signed-off-by: zachaller Signed-off-by: Philip Clark --- utils/record/record.go | 40 ++++++++++++++++++++++++------------- utils/record/record_test.go | 14 ++++++------- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/utils/record/record.go b/utils/record/record.go index d2bd322acf..859b954390 100644 --- a/utils/record/record.go +++ b/utils/record/record.go @@ -218,9 +218,7 @@ func (e *EventRecorderAdapter) defaultEventf(object runtime.Object, warn bool, o err := e.sendNotifications(api, object, opts) if err != nil { logCtx.Errorf("Notifications failed to send for eventReason %s with error: %s", opts.EventReason, err) - e.NotificationFailedCounter.WithLabelValues(namespace, name, opts.EventType, opts.EventReason).Inc() } - e.NotificationSuccessCounter.WithLabelValues(namespace, name, opts.EventType, opts.EventReason).Inc() } } @@ -248,7 +246,7 @@ func NewAPIFactorySettings() api.Settings { } // Send notifications for triggered event if user is subscribed -func (e *EventRecorderAdapter) sendNotifications(notificationsAPI api.API, object runtime.Object, opts EventOptions) error { +func (e *EventRecorderAdapter) sendNotifications(notificationsAPI api.API, object runtime.Object, opts EventOptions) []error { logCtx := logutil.WithObject(object) _, namespace, name := logutil.KindNamespaceName(logCtx) startTime := timeutil.Now() @@ -259,7 +257,7 @@ func (e *EventRecorderAdapter) sendNotifications(notificationsAPI api.API, objec }() if notificationsAPI == nil { - return fmt.Errorf("notificationsAPI is nil") + return []error{fmt.Errorf("NotificationsAPI is nil")} } cfg := notificationsAPI.GetConfig() @@ -274,39 +272,53 @@ func (e *EventRecorderAdapter) sendNotifications(notificationsAPI api.API, objec objMap, err := toObjectMap(object) if err != nil { - return err + return []error{err} } emptyCondition := hash("") + // We should not return in these loops because we want other configured notifications to still send if they can. + errors := []error{} for _, destination := range destinations { res, err := notificationsAPI.RunTrigger(trigger, objMap) if err != nil { - log.Errorf("Failed to execute condition of trigger %s: %v", trigger, err) - return err + log.Errorf("Failed to run trigger, trigger: %s, destination: %s, namespace config: %s : %v", + trigger, destination, notificationsAPI.GetConfig().Namespace, err) + errors = append(errors, err) + continue } log.Infof("Trigger %s result: %v", trigger, res) for _, c := range res { - log.Infof("Res When Condition hash: %s, Templates: %s", c.Key, c.Templates) + log.Infof("Result when condition hash: %s, templates: %s", c.Key, c.Templates) s := strings.Split(c.Key, ".")[1] if s != emptyCondition && c.Triggered == true { err = notificationsAPI.Send(objMap, c.Templates, destination) if err != nil { - log.Errorf("notification error: %s", err.Error()) - return err + log.Errorf("Failed to execute the sending of notification on not empty condition, trigger: %s, destination: %s, namespace config: %s : %v", + trigger, destination, notificationsAPI.GetConfig().Namespace, err) + e.NotificationFailedCounter.WithLabelValues(namespace, name, opts.EventType, opts.EventReason).Inc() + errors = append(errors, err) + continue } + e.NotificationSuccessCounter.WithLabelValues(namespace, name, opts.EventType, opts.EventReason).Inc() } else if s == emptyCondition { err = notificationsAPI.Send(objMap, c.Templates, destination) if err != nil { - log.Errorf("notification error: %s", err.Error()) - return err + log.Errorf("Failed to execute the sending of notification on empty condition, trigger: %s, destination: %s, namespace config: %s : %v", + trigger, destination, notificationsAPI.GetConfig().Namespace, err) + e.NotificationFailedCounter.WithLabelValues(namespace, name, opts.EventType, opts.EventReason).Inc() + errors = append(errors, err) + continue } + e.NotificationSuccessCounter.WithLabelValues(namespace, name, opts.EventType, opts.EventReason).Inc() } } } - - return nil + if len(errors) == 0 { + return nil + } + return errors } // This function is copied over from notification engine to make sure we honour emptyCondition diff --git a/utils/record/record_test.go b/utils/record/record_test.go index 6c494a3ac7..97f4452441 100644 --- a/utils/record/record_test.go +++ b/utils/record/record_test.go @@ -113,7 +113,7 @@ func TestSendNotifications(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory //ch := make(chan prometheus.HistogramVec, 1) err := rec.sendNotifications(mockAPI, &r, EventOptions{EventReason: "FooReason"}) - assert.NoError(t, err) + assert.Nil(t, err) } func TestSendNotificationsWhenCondition(t *testing.T) { @@ -140,7 +140,7 @@ func TestSendNotificationsWhenCondition(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory //ch := make(chan prometheus.HistogramVec, 1) err := rec.sendNotifications(mockAPI, &r, EventOptions{EventReason: "FooReason"}) - assert.NoError(t, err) + assert.Nil(t, err) } func TestSendNotificationsWhenConditionTime(t *testing.T) { @@ -340,7 +340,7 @@ func TestSendNotificationsFails(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory err := rec.sendNotifications(mockAPI, &r, EventOptions{EventReason: "FooReason"}) - assert.Error(t, err) + assert.Len(t, err, 1) }) t.Run("GetAPIError", func(t *testing.T) { @@ -349,7 +349,7 @@ func TestSendNotificationsFails(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory err := rec.sendNotifications(nil, &r, EventOptions{EventReason: "FooReason"}) - assert.Error(t, err) + assert.NotNil(t, err) }) } @@ -380,7 +380,7 @@ func TestSendNotificationsFailsWithRunTriggerError(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory err := rec.sendNotifications(mockAPI, &r, EventOptions{EventReason: "FooReason"}) - assert.Error(t, err) + assert.Len(t, err, 1) }) t.Run("GetAPIError", func(t *testing.T) { @@ -389,7 +389,7 @@ func TestSendNotificationsFailsWithRunTriggerError(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory err := rec.sendNotifications(nil, &r, EventOptions{EventReason: "FooReason"}) - assert.Error(t, err) + assert.NotNil(t, err) }) } @@ -419,7 +419,7 @@ func TestSendNotificationsNoTrigger(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory err := rec.sendNotifications(mockAPI, &r, EventOptions{EventReason: "MissingReason"}) - assert.Error(t, err) + assert.Len(t, err, 1) } func TestNewAPIFactorySettings(t *testing.T) { From 92ad8ff682f0fc5bb46644cd23b668b6516a6419 Mon Sep 17 00:00:00 2001 From: "Yuan (Terry) Tang" Date: Mon, 9 Oct 2023 18:56:48 -0400 Subject: [PATCH 088/187] fix: Replace antonmedv/expr with expr-lang/expr (#3090) Signed-off-by: Yuan Tang Signed-off-by: Philip Clark --- go.mod | 1 + go.sum | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 8e9b03f62b..dcf303cccb 100644 --- a/go.mod +++ b/go.mod @@ -199,6 +199,7 @@ require ( ) replace ( + github.com/antonmedv/expr => github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 k8s.io/api v0.0.0 => k8s.io/api v0.25.8 k8s.io/apiextensions-apiserver v0.0.0 => k8s.io/apiextensions-apiserver v0.25.8 diff --git a/go.sum b/go.sum index 764feeed8d..6aa0f675cf 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,6 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= -github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= @@ -210,6 +208,8 @@ github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0n github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= +github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 h1:Sg2XxaymeyqqaLG34aB2mvlX+nii916/Gv1ovWc4jMc= +github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= From 064dbc04f9ec600bc7762900d035beceb617e5ae Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Wed, 11 Oct 2023 07:04:30 -0600 Subject: [PATCH 089/187] fix: revert repo change to expr (#3094) revert repo change to expr Signed-off-by: zachaller Signed-off-by: Philip Clark --- go.mod | 1 - go.sum | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index dcf303cccb..8e9b03f62b 100644 --- a/go.mod +++ b/go.mod @@ -199,7 +199,6 @@ require ( ) replace ( - github.com/antonmedv/expr => github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 k8s.io/api v0.0.0 => k8s.io/api v0.25.8 k8s.io/apiextensions-apiserver v0.0.0 => k8s.io/apiextensions-apiserver v0.25.8 diff --git a/go.sum b/go.sum index 6aa0f675cf..764feeed8d 100644 --- a/go.sum +++ b/go.sum @@ -91,6 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= +github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= @@ -208,8 +210,6 @@ github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0n github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= -github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 h1:Sg2XxaymeyqqaLG34aB2mvlX+nii916/Gv1ovWc4jMc= -github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= From d348da01a4276c8948d2c8904d5c2a513e9177ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 08:28:40 -0500 Subject: [PATCH 090/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudwatch from 1.27.7 to 1.27.8 (#3086) chore(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudwatch Bumps [github.com/aws/aws-sdk-go-v2/service/cloudwatch](https://github.com/aws/aws-sdk-go-v2) from 1.27.7 to 1.27.8. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.27.7...service/s3/v1.27.8) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/cloudwatch dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 10 +++++----- go.sum | 16 ++++++++++------ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 8e9b03f62b..546e3c00b1 100644 --- a/go.mod +++ b/go.mod @@ -6,9 +6,9 @@ require ( github.com/antonmedv/expr v1.15.3 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 - github.com/aws/aws-sdk-go-v2 v1.21.0 + github.com/aws/aws-sdk-go-v2 v1.21.1 github.com/aws/aws-sdk-go-v2/config v1.18.43 - github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 + github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible github.com/bombsimon/logrusr/v4 v4.0.0 @@ -84,14 +84,14 @@ require ( github.com/aws/aws-sdk-go v1.44.116 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.13.41 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect - github.com/aws/smithy-go v1.14.2 // indirect + github.com/aws/smithy-go v1.15.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect diff --git a/go.sum b/go.sum index 764feeed8d..5f95f72576 100644 --- a/go.sum +++ b/go.sum @@ -103,22 +103,25 @@ github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2z github.com/aws/aws-sdk-go v1.44.39/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= +github.com/aws/aws-sdk-go-v2 v1.21.1 h1:wjHYshtPpYOZm+/mu3NhVgRRc0baM6LJZOmxPZ5Cwzs= +github.com/aws/aws-sdk-go-v2 v1.21.1/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= github.com/aws/aws-sdk-go-v2/config v1.18.43 h1:IgdUtTRvUDC6eiJBqU6vh7bHFNAEBjQ8S+qJ7zVhDOs= github.com/aws/aws-sdk-go-v2/config v1.18.43/go.mod h1:NiFev8qlgg8MPzw3fO/EwzMZeZwlJEKGwfpjRPA9Nvw= github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9rmEzEhbZFh9JQW/Bg= github.com/aws/aws-sdk-go-v2/credentials v1.13.41/go.mod h1:cc3Fn7DkKbJalPtQnudHGZZ8ml9+hwtbc1CJONsYYqk= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 h1:SijA0mgjV8E+8G45ltVHs0fvKpTj8xmZJ3VwhGKtUSI= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 h1:817VqVe6wvwE46xXy6YF5RywvjOX6U2zRQQ6IbQFK0s= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42/go.mod h1:oDfgXoBBmj+kXnqxDDnIDnC56QBosglKp8ftRCTxR+0= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 h1:7ZApaXzWbo8slc+W5TynuUlB4z66g44h7uqa3/d/BsY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36/go.mod h1:rwr4WnmFi3RJO0M4dxbJtgi9BPLMpVBMX1nUte5ha9U= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 h1:qULF+ElcvjjSEO1+z5x+TmKE9d4yTej7PfpJQPVvexY= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7/go.mod h1:1HKxVrj5wsKy/wb2v07vzTSd+YPV1sDsWxferwPK7PA= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 h1:pdUFDCmsKlwEwVJyq/k3xLBtS/sym3dhBMTCIEDaN40= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8/go.mod h1:EwMPL+Fu95r6yS2UQY99lRR1rDjgCbcPQpy1aQ3fuxE= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= @@ -129,8 +132,9 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaK github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= -github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= +github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= From 4d48628ef4d5a38a570b16e09848aa61ce39a279 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 08:28:59 -0500 Subject: [PATCH 091/187] chore(deps): bump github.com/aws/aws-sdk-go-v2 from 1.21.0 to 1.21.1 (#3085) Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.21.0 to 1.21.1. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.21.0...v1.21.1) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark From e8da966c036c71cba3ccbdf93d84b7a545ade98a Mon Sep 17 00:00:00 2001 From: PranitRout07 Date: Wed, 11 Oct 2023 18:59:53 +0530 Subject: [PATCH 092/187] docs: Ensure image not present between incomplete sentence. (#3079) * Update anti-affinity.md * Update mkdocs.yml Signed-off-by: Philip Clark --- docs/features/anti-affinity/anti-affinity.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/features/anti-affinity/anti-affinity.md b/docs/features/anti-affinity/anti-affinity.md index 3c46171d70..2a547c9c07 100644 --- a/docs/features/anti-affinity/anti-affinity.md +++ b/docs/features/anti-affinity/anti-affinity.md @@ -31,6 +31,7 @@ You can learn more about anti-affinity [here](https://kubernetes.io/docs/concept Repeating the above example with anti-affinity enabled, here is what happens when the `.spec.template` of the Rollout changes. Due to anti-affinity, the new pods cannot be scheduled on nodes which run the old ReplicaSet's pods. As a result, the cluster auto-scaler must create 2 nodes to host the new ReplicaSet's pods. In this case, pods won't be started since the scaled-down nodes are guaranteed to not have the new pods. + ![ Original Rollout is running, spread across two nodes](images/solution.png) ## Enabling Anti-Affinity in Rollouts From ad96e9409fe17828558fa9711c66f03f98055bbe Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Wed, 11 Oct 2023 14:20:16 -0400 Subject: [PATCH 093/187] cleanup Signed-off-by: Philip Clark --- ui/src/app/components/rollout-actions/rollout-actions.tsx | 3 --- ui/src/app/components/rollout-widget/rollout-widget.scss | 3 --- ui/src/app/components/rollout-widget/rollout-widget.tsx | 1 - ui/src/app/components/rollouts-grid/rollouts-grid.tsx | 4 ---- ui/src/app/components/rollouts-home/rollouts-home.tsx | 5 ++--- 5 files changed, 2 insertions(+), 14 deletions(-) diff --git a/ui/src/app/components/rollout-actions/rollout-actions.tsx b/ui/src/app/components/rollout-actions/rollout-actions.tsx index 2eaad61502..81b5ce1ead 100644 --- a/ui/src/app/components/rollout-actions/rollout-actions.tsx +++ b/ui/src/app/components/rollout-actions/rollout-actions.tsx @@ -25,7 +25,6 @@ interface ActionData { shouldConfirm?: boolean; } -// export const RolloutActionButton = (props: {action: RolloutAction; rollout: RolloutInfo; callback?: Function; indicateLoading: boolean; disabled?: boolean}) => { export const RolloutActionButton = React.memo( ({action, rollout, callback, indicateLoading, disabled}: {action: RolloutAction; rollout: RolloutInfo; callback?: Function; indicateLoading: boolean; disabled?: boolean}) => { const [loading, setLoading] = React.useState(false); @@ -92,8 +91,6 @@ export const RolloutActionButton = React.memo( const ap = actionMap.get(action); - // const [loading, setLoading] = React.useState(false); - return ( void /> {(rollout.strategy || '').toLocaleLowerCase() === 'canary' && } - {/* {(rollout.replicaSets || []).length < 1 && } */}
{rollout.message !== 'CanaryPauseStep' && rollout.message}
diff --git a/ui/src/app/components/rollouts-grid/rollouts-grid.tsx b/ui/src/app/components/rollouts-grid/rollouts-grid.tsx index 1692d637b6..0784257905 100644 --- a/ui/src/app/components/rollouts-grid/rollouts-grid.tsx +++ b/ui/src/app/components/rollouts-grid/rollouts-grid.tsx @@ -5,10 +5,6 @@ import {RolloutInfo} from '../../../models/rollout/rollout'; import {RolloutWidget} from '../rollout-widget/rollout-widget'; export const RolloutsGrid = ({rollouts}: {rollouts: RolloutInfo[]}) => { - // ({ rollouts, onFavoriteChange, favorites }: { rollouts: RolloutInfo[], onFavoriteChange: (rollout: RolloutInfo) => void, favorites: { [key: string]: boolean } }) => { - // const handleFavoriteChange = (rollout: RolloutInfo) => { - // onFavoriteChange(rollout); - // }; return (
{rollouts.map((rollout, i) => ( diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index 6c1766dc32..cb2fde0a00 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -5,10 +5,9 @@ import {faCircleNotch} from '@fortawesome/free-solid-svg-icons'; import {NamespaceContext} from '../../shared/context/api'; import {useWatchRollouts} from '../../shared/services/rollout'; -import {RolloutsToolbar, defaultDisplayMode} from '../rollouts-toolbar/rollouts-toolbar'; +import {RolloutsToolbar, defaultDisplayMode, Filters} from '../rollouts-toolbar/rollouts-toolbar'; import {RolloutsTable} from '../rollouts-table/rollouts-table'; import {RolloutsGrid} from '../rollouts-grid/rollouts-grid'; -import {Filters} from '../rollouts-toolbar/rollouts-toolbar'; import './rollouts-home.scss'; export const RolloutsHome = () => { @@ -49,7 +48,7 @@ export const RolloutsHome = () => { setFavorites(newFavorites); localStorage.setItem('rolloutsFavorites', JSON.stringify(newFavorites)); }; - + const filteredRollouts = React.useMemo(() => { return rollouts.filter((r) => { if (filters.showFavorites && !favorites[r.objectMeta.name]) { From 0944bbb9f406b64a7848a604536cf3032ee840a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 08:33:19 -0500 Subject: [PATCH 094/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.38 to 1.18.39 (#3018) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.38 to 1.18.39. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.38...config/v1.18.39) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 18 +++++++++--------- go.sum | 23 +++++++++++------------ 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index 546e3c00b1..00d0d550b6 100644 --- a/go.mod +++ b/go.mod @@ -6,10 +6,10 @@ require ( github.com/antonmedv/expr v1.15.3 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 - github.com/aws/aws-sdk-go-v2 v1.21.1 - github.com/aws/aws-sdk-go-v2/config v1.18.43 - github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 - github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 + github.com/aws/aws-sdk-go-v2 v1.21.0 + github.com/aws/aws-sdk-go-v2/config v1.18.39 + github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 + github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3 github.com/blang/semver v3.5.1+incompatible github.com/bombsimon/logrusr/v4 v4.0.0 github.com/evanphx/json-patch/v5 v5.7.0 @@ -82,16 +82,16 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.41 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.37 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect - github.com/aws/smithy-go v1.15.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 // indirect + github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect diff --git a/go.sum b/go.sum index 5f95f72576..6dbc4c9045 100644 --- a/go.sum +++ b/go.sum @@ -104,12 +104,10 @@ github.com/aws/aws-sdk-go v1.44.39/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4 github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2 v1.21.1 h1:wjHYshtPpYOZm+/mu3NhVgRRc0baM6LJZOmxPZ5Cwzs= -github.com/aws/aws-sdk-go-v2 v1.21.1/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= -github.com/aws/aws-sdk-go-v2/config v1.18.43 h1:IgdUtTRvUDC6eiJBqU6vh7bHFNAEBjQ8S+qJ7zVhDOs= -github.com/aws/aws-sdk-go-v2/config v1.18.43/go.mod h1:NiFev8qlgg8MPzw3fO/EwzMZeZwlJEKGwfpjRPA9Nvw= -github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9rmEzEhbZFh9JQW/Bg= -github.com/aws/aws-sdk-go-v2/credentials v1.13.41/go.mod h1:cc3Fn7DkKbJalPtQnudHGZZ8ml9+hwtbc1CJONsYYqk= +github.com/aws/aws-sdk-go-v2/config v1.18.39 h1:oPVyh6fuu/u4OiW4qcuQyEtk7U7uuNBmHmJSLg1AJsQ= +github.com/aws/aws-sdk-go-v2/config v1.18.39/go.mod h1:+NH/ZigdPckFpgB1TRcRuWCB/Kbbvkxc/iNAKTq5RhE= +github.com/aws/aws-sdk-go-v2/credentials v1.13.37 h1:BvEdm09+ZEh2XtN+PVHPcYwKY3wIeB6pw7vPRM4M9/U= +github.com/aws/aws-sdk-go-v2/credentials v1.13.37/go.mod h1:ACLrdkd4CLZyXOghZ8IYumQbcooAcp2jo/s2xsFH8IM= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= @@ -126,12 +124,13 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeo github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 h1:vuGK1vHNP9zx0PfOrtPumbwR2af0ATQ1Z2H6p75AgRQ= -github.com/aws/aws-sdk-go-v2/service/sso v1.15.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= -github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= -github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 h1:2PylFCfKCEDv6PeSN09pC/VUiRd10wi1VfHG5FrW0/g= +github.com/aws/aws-sdk-go-v2/service/sso v1.13.6/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 h1:pSB560BbVj9ZlJZF4WYj5zsytWHWKxg+NgyGV4B2L58= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 h1:CQBFElb0LS8RojMJlxRSo/HXipvTZW2S44Lt9Mk2aYQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.21.5/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= From 0c0714154e38584ea8638858737928fe959a0fd9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 14:05:27 -0500 Subject: [PATCH 095/187] chore(deps): bump github.com/antonmedv/expr from 1.13.0 to 1.15.1 (#3024) Bumps [github.com/antonmedv/expr](https://github.com/antonmedv/expr) from 1.13.0 to 1.15.1. - [Release notes](https://github.com/antonmedv/expr/releases) - [Commits](https://github.com/antonmedv/expr/compare/v1.13.0...v1.15.1) --- updated-dependencies: - dependency-name: github.com/antonmedv/expr dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 00d0d550b6..6fdd8ffa88 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/argoproj/argo-rollouts go 1.20 require ( - github.com/antonmedv/expr v1.15.3 + github.com/antonmedv/expr v1.15.1 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 diff --git a/go.sum b/go.sum index 6dbc4c9045..3b6229f6d1 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= -github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= +github.com/antonmedv/expr v1.15.1 h1:mxeRIkH8GQJo4MRRFgp0ArlV4AA+0DmcJNXEsG70rGU= +github.com/antonmedv/expr v1.15.1/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= From 900ed5e5dae0e69db4eec701e187d1935e28ad61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 14:06:00 -0500 Subject: [PATCH 096/187] chore(deps): bump github.com/hashicorp/go-plugin from 1.5.0 to 1.5.1 (#3017) Bumps [github.com/hashicorp/go-plugin](https://github.com/hashicorp/go-plugin) from 1.5.0 to 1.5.1. - [Release notes](https://github.com/hashicorp/go-plugin/releases) - [Changelog](https://github.com/hashicorp/go-plugin/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/go-plugin/compare/v1.5.0...v1.5.1) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6fdd8ffa88..8cc6c5642f 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.3 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/hashicorp/go-plugin v1.5.2 + github.com/hashicorp/go-plugin v1.5.1 github.com/influxdata/influxdb-client-go/v2 v2.12.3 github.com/juju/ansiterm v1.0.0 github.com/machinebox/graphql v0.2.2 diff --git a/go.sum b/go.sum index 3b6229f6d1..733f1c9ff3 100644 --- a/go.sum +++ b/go.sum @@ -405,8 +405,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.14.1 h1:nQcJDQwIAGnmoUWp8ubocEX40cCml/17YkF6csQLReU= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= -github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= +github.com/hashicorp/go-plugin v1.5.1 h1:oGm7cWBaYIp3lJpx1RUEfLWophprE2EV/KUeqBYo+6k= +github.com/hashicorp/go-plugin v1.5.1/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.1/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= From f6db4dfb0fddbc919724c70c629a77ff8466f678 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Sep 2023 12:03:56 -0500 Subject: [PATCH 097/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 from 1.21.3 to 1.21.4 (#3025) chore(deps): bump github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 Bumps [github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2](https://github.com/aws/aws-sdk-go-v2) from 1.21.3 to 1.21.4. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/efs/v1.21.3...service/efs/v1.21.4) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 8cc6c5642f..f8bb3e3e39 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.21.0 github.com/aws/aws-sdk-go-v2/config v1.18.39 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 - github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3 + github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible github.com/bombsimon/logrusr/v4 v4.0.0 github.com/evanphx/json-patch/v5 v5.7.0 diff --git a/go.sum b/go.sum index 733f1c9ff3..c1e06600fb 100644 --- a/go.sum +++ b/go.sum @@ -114,12 +114,10 @@ github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPne github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 h1:817VqVe6wvwE46xXy6YF5RywvjOX6U2zRQQ6IbQFK0s= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42/go.mod h1:oDfgXoBBmj+kXnqxDDnIDnC56QBosglKp8ftRCTxR+0= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 h1:7ZApaXzWbo8slc+W5TynuUlB4z66g44h7uqa3/d/BsY= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36/go.mod h1:rwr4WnmFi3RJO0M4dxbJtgi9BPLMpVBMX1nUte5ha9U= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 h1:pdUFDCmsKlwEwVJyq/k3xLBtS/sym3dhBMTCIEDaN40= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8/go.mod h1:EwMPL+Fu95r6yS2UQY99lRR1rDjgCbcPQpy1aQ3fuxE= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 h1:GPUcE/Yq7Ur8YSUk6lVkoIMWnJNO0HT18GUzCWCgCI0= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 h1:qULF+ElcvjjSEO1+z5x+TmKE9d4yTej7PfpJQPVvexY= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7/go.mod h1:1HKxVrj5wsKy/wb2v07vzTSd+YPV1sDsWxferwPK7PA= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= From 95b017172eeca818e706c0aba5f825758f882c08 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:10:00 -0500 Subject: [PATCH 098/187] chore(deps): bump github.com/antonmedv/expr from 1.15.1 to 1.15.2 (#3036) Bumps [github.com/antonmedv/expr](https://github.com/antonmedv/expr) from 1.15.1 to 1.15.2. - [Release notes](https://github.com/antonmedv/expr/releases) - [Commits](https://github.com/antonmedv/expr/compare/v1.15.1...v1.15.2) --- updated-dependencies: - dependency-name: github.com/antonmedv/expr dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f8bb3e3e39..139d02415a 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/argoproj/argo-rollouts go 1.20 require ( - github.com/antonmedv/expr v1.15.1 + github.com/antonmedv/expr v1.15.2 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 diff --git a/go.sum b/go.sum index c1e06600fb..a44a2c0c65 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.1 h1:mxeRIkH8GQJo4MRRFgp0ArlV4AA+0DmcJNXEsG70rGU= -github.com/antonmedv/expr v1.15.1/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= +github.com/antonmedv/expr v1.15.2 h1:afFXpDWIC2n3bF+kTZE1JvFo+c34uaM3sTqh8z0xfdU= +github.com/antonmedv/expr v1.15.2/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= From 045023cb524caebfcb542004db4067a5b0c5d2c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:10:56 -0500 Subject: [PATCH 099/187] chore(deps): bump docker/setup-buildx-action from 2.10.0 to 3.0.0 (#3034) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.10.0 to 3.0.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/885d1462b80bc1c1c7f0b00334ad271f09369c55...f95db51fddba0c2d1ec667646a06c2ce06100226) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/image-reuse.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index eefb23923d..6c98cb9bfc 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -78,7 +78,7 @@ jobs: with: cosign-release: 'v2.0.2' - - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 + - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Setup tags for container image as a CSV type From c037c261ffecced665e2866ec90d36cd9b74a9e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:13:13 -0500 Subject: [PATCH 100/187] chore(deps): bump google.golang.org/grpc from 1.57.0 to 1.58.0 (#3023) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.57.0 to 1.58.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.57.0...v1.58.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 139d02415a..d1c2c9af06 100644 --- a/go.mod +++ b/go.mod @@ -37,7 +37,7 @@ require ( github.com/tj/assert v0.0.3 github.com/valyala/fasttemplate v1.2.2 google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 - google.golang.org/grpc v1.58.2 + google.golang.org/grpc v1.58.0 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.8 diff --git a/go.sum b/go.sum index a44a2c0c65..2b30b8db73 100644 --- a/go.sum +++ b/go.sum @@ -1098,8 +1098,8 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= -google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o= +google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 34a8d71f00d9a87fb76d8fa88524f8a3112dd3a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 12:12:13 -0500 Subject: [PATCH 101/187] chore(deps): bump google.golang.org/grpc from 1.58.0 to 1.58.2 (#3050) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.0 to 1.58.2. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.58.0...v1.58.2) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d1c2c9af06..139d02415a 100644 --- a/go.mod +++ b/go.mod @@ -37,7 +37,7 @@ require ( github.com/tj/assert v0.0.3 github.com/valyala/fasttemplate v1.2.2 google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 - google.golang.org/grpc v1.58.0 + google.golang.org/grpc v1.58.2 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.8 diff --git a/go.sum b/go.sum index 2b30b8db73..a44a2c0c65 100644 --- a/go.sum +++ b/go.sum @@ -1098,8 +1098,8 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o= -google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= +google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From aed852e523912bd53586f4097a534033d3ccf5c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Sep 2023 21:01:10 -0500 Subject: [PATCH 102/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.39 to 1.18.41 (#3047) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.39 to 1.18.41. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.39...config/v1.18.41) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 139d02415a..991a808888 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.39 + github.com/aws/aws-sdk-go-v2/config v1.18.41 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,15 +82,15 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.37 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.39 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect diff --git a/go.sum b/go.sum index a44a2c0c65..c26796ed4d 100644 --- a/go.sum +++ b/go.sum @@ -104,10 +104,10 @@ github.com/aws/aws-sdk-go v1.44.39/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4 github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.39 h1:oPVyh6fuu/u4OiW4qcuQyEtk7U7uuNBmHmJSLg1AJsQ= -github.com/aws/aws-sdk-go-v2/config v1.18.39/go.mod h1:+NH/ZigdPckFpgB1TRcRuWCB/Kbbvkxc/iNAKTq5RhE= -github.com/aws/aws-sdk-go-v2/credentials v1.13.37 h1:BvEdm09+ZEh2XtN+PVHPcYwKY3wIeB6pw7vPRM4M9/U= -github.com/aws/aws-sdk-go-v2/credentials v1.13.37/go.mod h1:ACLrdkd4CLZyXOghZ8IYumQbcooAcp2jo/s2xsFH8IM= +github.com/aws/aws-sdk-go-v2/config v1.18.41 h1:Go7z97YDsBJVNAaL7pDPKB6LeHEsAkHmFe+CeK30fUQ= +github.com/aws/aws-sdk-go-v2/config v1.18.41/go.mod h1:+yR45+A0LIMKT8bWOKo90Hy9rSrovEmEKoPKLmmVec8= +github.com/aws/aws-sdk-go-v2/credentials v1.13.39 h1:UnwBXDIHKDaejSXaRzKR57IdGCizk+z1DEhnsFpus7Q= +github.com/aws/aws-sdk-go-v2/credentials v1.13.39/go.mod h1:OJ9P239A90TnglJEF3qofKiNeEM6PCV/m+aNGV5WC24= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= @@ -122,12 +122,12 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeo github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 h1:2PylFCfKCEDv6PeSN09pC/VUiRd10wi1VfHG5FrW0/g= -github.com/aws/aws-sdk-go-v2/service/sso v1.13.6/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 h1:pSB560BbVj9ZlJZF4WYj5zsytWHWKxg+NgyGV4B2L58= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= -github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 h1:CQBFElb0LS8RojMJlxRSo/HXipvTZW2S44Lt9Mk2aYQ= -github.com/aws/aws-sdk-go-v2/service/sts v1.21.5/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 h1:AR/hlTsCyk1CwlyKnPFvIMvnONydRjDDRT9OGb0i+/g= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 h1:UniOmlPJelksyP5dGjfRoFTmLDy4/o0HH1lK2Op7zC8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk= +github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= From 0691aaadbf5b8aefff7890770e20b3847dda14a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Sep 2023 21:05:26 -0500 Subject: [PATCH 103/187] chore(deps): bump docker/setup-qemu-action from 2.2.0 to 3.0.0 (#3031) Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2.2.0 to 3.0.0. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/2b82ce82d56a2a04d2637cd93a637ae1b359c0a7...68827325e0b33c7199eb31dd4e31fbe9023e06e3) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/image-reuse.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index 6c98cb9bfc..eefb23923d 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -78,7 +78,7 @@ jobs: with: cosign-release: 'v2.0.2' - - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 + - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Setup tags for container image as a CSV type From 63a0ea7176ef5719799a5eae66e2305e60743885 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Sep 2023 21:05:51 -0500 Subject: [PATCH 104/187] chore(deps): bump github.com/antonmedv/expr from 1.15.2 to 1.15.3 (#3046) Bumps [github.com/antonmedv/expr](https://github.com/antonmedv/expr) from 1.15.2 to 1.15.3. - [Release notes](https://github.com/antonmedv/expr/releases) - [Commits](https://github.com/antonmedv/expr/compare/v1.15.2...v1.15.3) --- updated-dependencies: - dependency-name: github.com/antonmedv/expr dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 991a808888..0649c123d3 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/argoproj/argo-rollouts go 1.20 require ( - github.com/antonmedv/expr v1.15.2 + github.com/antonmedv/expr v1.15.3 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 diff --git a/go.sum b/go.sum index c26796ed4d..a3d721eafa 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.2 h1:afFXpDWIC2n3bF+kTZE1JvFo+c34uaM3sTqh8z0xfdU= -github.com/antonmedv/expr v1.15.2/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= +github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= +github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= From 73c1d54dce1d6d993e61cb05a8c1fd156833f3ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 07:42:45 -0500 Subject: [PATCH 105/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.41 to 1.18.42 (#3055) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.41 to 1.18.42. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.41...config/v1.18.42) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 12 ++++++------ go.sum | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 0649c123d3..6fcf264f9c 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.41 + github.com/aws/aws-sdk-go-v2/config v1.18.42 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,14 +82,14 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.39 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.40 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect diff --git a/go.sum b/go.sum index a3d721eafa..1e0bd268aa 100644 --- a/go.sum +++ b/go.sum @@ -104,28 +104,28 @@ github.com/aws/aws-sdk-go v1.44.39/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4 github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.41 h1:Go7z97YDsBJVNAaL7pDPKB6LeHEsAkHmFe+CeK30fUQ= -github.com/aws/aws-sdk-go-v2/config v1.18.41/go.mod h1:+yR45+A0LIMKT8bWOKo90Hy9rSrovEmEKoPKLmmVec8= -github.com/aws/aws-sdk-go-v2/credentials v1.13.39 h1:UnwBXDIHKDaejSXaRzKR57IdGCizk+z1DEhnsFpus7Q= -github.com/aws/aws-sdk-go-v2/credentials v1.13.39/go.mod h1:OJ9P239A90TnglJEF3qofKiNeEM6PCV/m+aNGV5WC24= +github.com/aws/aws-sdk-go-v2/config v1.18.42 h1:28jHROB27xZwU0CB88giDSjz7M1Sba3olb5JBGwina8= +github.com/aws/aws-sdk-go-v2/config v1.18.42/go.mod h1:4AZM3nMMxwlG+eZlxvBKqwVbkDLlnN2a4UGTL6HjaZI= +github.com/aws/aws-sdk-go-v2/credentials v1.13.40 h1:s8yOkDh+5b1jUDhMBtngF6zKWLDs84chUk2Vk0c38Og= +github.com/aws/aws-sdk-go-v2/credentials v1.13.40/go.mod h1:VtEHVAAqDWASwdOqj/1huyT6uHbs5s8FUHfDQdky/Rs= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 h1:817VqVe6wvwE46xXy6YF5RywvjOX6U2zRQQ6IbQFK0s= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42/go.mod h1:oDfgXoBBmj+kXnqxDDnIDnC56QBosglKp8ftRCTxR+0= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 h1:GPUcE/Yq7Ur8YSUk6lVkoIMWnJNO0HT18GUzCWCgCI0= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 h1:qULF+ElcvjjSEO1+z5x+TmKE9d4yTej7PfpJQPVvexY= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7/go.mod h1:1HKxVrj5wsKy/wb2v07vzTSd+YPV1sDsWxferwPK7PA= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 h1:AR/hlTsCyk1CwlyKnPFvIMvnONydRjDDRT9OGb0i+/g= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 h1:UniOmlPJelksyP5dGjfRoFTmLDy4/o0HH1lK2Op7zC8= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 h1:YkNzx1RLS0F5qdf9v1Q8Cuv9NXCL2TkosOxhzlUPV64= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.1/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk= github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= From 637cd81c5d4d7821d4bd48110dac7b81017de473 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:37:52 -0500 Subject: [PATCH 106/187] chore(deps): bump github.com/hashicorp/go-plugin from 1.5.1 to 1.5.2 (#3056) Bumps [github.com/hashicorp/go-plugin](https://github.com/hashicorp/go-plugin) from 1.5.1 to 1.5.2. - [Release notes](https://github.com/hashicorp/go-plugin/releases) - [Changelog](https://github.com/hashicorp/go-plugin/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/go-plugin/compare/v1.5.1...v1.5.2) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6fcf264f9c..25a4d14444 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.3 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/hashicorp/go-plugin v1.5.1 + github.com/hashicorp/go-plugin v1.5.2 github.com/influxdata/influxdb-client-go/v2 v2.12.3 github.com/juju/ansiterm v1.0.0 github.com/machinebox/graphql v0.2.2 diff --git a/go.sum b/go.sum index 1e0bd268aa..98686dd4b5 100644 --- a/go.sum +++ b/go.sum @@ -403,8 +403,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.14.1 h1:nQcJDQwIAGnmoUWp8ubocEX40cCml/17YkF6csQLReU= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-plugin v1.5.1 h1:oGm7cWBaYIp3lJpx1RUEfLWophprE2EV/KUeqBYo+6k= -github.com/hashicorp/go-plugin v1.5.1/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.1/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= From 2f44a0b88136d5b9fcb92219a53e5f616e3a3292 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 08:14:24 -0500 Subject: [PATCH 107/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.42 to 1.18.43 (#3072) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.42 to 1.18.43. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.42...config/v1.18.43) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 25a4d14444..8e9b03f62b 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.42 + github.com/aws/aws-sdk-go-v2/config v1.18.43 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,15 +82,15 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.40 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.41 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect diff --git a/go.sum b/go.sum index 98686dd4b5..5856256bc5 100644 --- a/go.sum +++ b/go.sum @@ -104,10 +104,10 @@ github.com/aws/aws-sdk-go v1.44.39/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4 github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.42 h1:28jHROB27xZwU0CB88giDSjz7M1Sba3olb5JBGwina8= -github.com/aws/aws-sdk-go-v2/config v1.18.42/go.mod h1:4AZM3nMMxwlG+eZlxvBKqwVbkDLlnN2a4UGTL6HjaZI= -github.com/aws/aws-sdk-go-v2/credentials v1.13.40 h1:s8yOkDh+5b1jUDhMBtngF6zKWLDs84chUk2Vk0c38Og= -github.com/aws/aws-sdk-go-v2/credentials v1.13.40/go.mod h1:VtEHVAAqDWASwdOqj/1huyT6uHbs5s8FUHfDQdky/Rs= +github.com/aws/aws-sdk-go-v2/config v1.18.43 h1:IgdUtTRvUDC6eiJBqU6vh7bHFNAEBjQ8S+qJ7zVhDOs= +github.com/aws/aws-sdk-go-v2/config v1.18.43/go.mod h1:NiFev8qlgg8MPzw3fO/EwzMZeZwlJEKGwfpjRPA9Nvw= +github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9rmEzEhbZFh9JQW/Bg= +github.com/aws/aws-sdk-go-v2/credentials v1.13.41/go.mod h1:cc3Fn7DkKbJalPtQnudHGZZ8ml9+hwtbc1CJONsYYqk= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= @@ -122,12 +122,12 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeo github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 h1:YkNzx1RLS0F5qdf9v1Q8Cuv9NXCL2TkosOxhzlUPV64= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.1/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 h1:vuGK1vHNP9zx0PfOrtPumbwR2af0ATQ1Z2H6p75AgRQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= -github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk= -github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= From ea269ef703d7c35f3a942a511ca48e948522ef88 Mon Sep 17 00:00:00 2001 From: "Yuan (Terry) Tang" Date: Mon, 9 Oct 2023 18:56:48 -0400 Subject: [PATCH 108/187] fix: Replace antonmedv/expr with expr-lang/expr (#3090) Signed-off-by: Yuan Tang Signed-off-by: Philip Clark --- go.mod | 1 + go.sum | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 8e9b03f62b..dcf303cccb 100644 --- a/go.mod +++ b/go.mod @@ -199,6 +199,7 @@ require ( ) replace ( + github.com/antonmedv/expr => github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 k8s.io/api v0.0.0 => k8s.io/api v0.25.8 k8s.io/apiextensions-apiserver v0.0.0 => k8s.io/apiextensions-apiserver v0.25.8 diff --git a/go.sum b/go.sum index 5856256bc5..5d00d2fedc 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,6 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= -github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= @@ -211,6 +209,8 @@ github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0n github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= +github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 h1:Sg2XxaymeyqqaLG34aB2mvlX+nii916/Gv1ovWc4jMc= +github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= From 7d087e34e75b6ec58dac90544eca18ee66229b49 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Wed, 11 Oct 2023 07:04:30 -0600 Subject: [PATCH 109/187] fix: revert repo change to expr (#3094) revert repo change to expr Signed-off-by: zachaller Signed-off-by: Philip Clark --- go.mod | 1 - go.sum | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index dcf303cccb..8e9b03f62b 100644 --- a/go.mod +++ b/go.mod @@ -199,7 +199,6 @@ require ( ) replace ( - github.com/antonmedv/expr => github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 k8s.io/api v0.0.0 => k8s.io/api v0.25.8 k8s.io/apiextensions-apiserver v0.0.0 => k8s.io/apiextensions-apiserver v0.25.8 diff --git a/go.sum b/go.sum index 5d00d2fedc..5856256bc5 100644 --- a/go.sum +++ b/go.sum @@ -91,6 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= +github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= @@ -209,8 +211,6 @@ github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0n github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= -github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 h1:Sg2XxaymeyqqaLG34aB2mvlX+nii916/Gv1ovWc4jMc= -github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= From 6fb0dd96ff3b00dc16b157f0a259bd0a6bea7fdf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 08:28:40 -0500 Subject: [PATCH 110/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudwatch from 1.27.7 to 1.27.8 (#3086) chore(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudwatch Bumps [github.com/aws/aws-sdk-go-v2/service/cloudwatch](https://github.com/aws/aws-sdk-go-v2) from 1.27.7 to 1.27.8. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.27.7...service/s3/v1.27.8) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/cloudwatch dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 10 +++++----- go.sum | 9 ++++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 8e9b03f62b..546e3c00b1 100644 --- a/go.mod +++ b/go.mod @@ -6,9 +6,9 @@ require ( github.com/antonmedv/expr v1.15.3 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 - github.com/aws/aws-sdk-go-v2 v1.21.0 + github.com/aws/aws-sdk-go-v2 v1.21.1 github.com/aws/aws-sdk-go-v2/config v1.18.43 - github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 + github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible github.com/bombsimon/logrusr/v4 v4.0.0 @@ -84,14 +84,14 @@ require ( github.com/aws/aws-sdk-go v1.44.116 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.13.41 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect - github.com/aws/smithy-go v1.14.2 // indirect + github.com/aws/smithy-go v1.15.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect diff --git a/go.sum b/go.sum index 5856256bc5..5f95f72576 100644 --- a/go.sum +++ b/go.sum @@ -104,6 +104,8 @@ github.com/aws/aws-sdk-go v1.44.39/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4 github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= +github.com/aws/aws-sdk-go-v2 v1.21.1 h1:wjHYshtPpYOZm+/mu3NhVgRRc0baM6LJZOmxPZ5Cwzs= +github.com/aws/aws-sdk-go-v2 v1.21.1/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= github.com/aws/aws-sdk-go-v2/config v1.18.43 h1:IgdUtTRvUDC6eiJBqU6vh7bHFNAEBjQ8S+qJ7zVhDOs= github.com/aws/aws-sdk-go-v2/config v1.18.43/go.mod h1:NiFev8qlgg8MPzw3fO/EwzMZeZwlJEKGwfpjRPA9Nvw= github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9rmEzEhbZFh9JQW/Bg= @@ -114,10 +116,12 @@ github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPne github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 h1:817VqVe6wvwE46xXy6YF5RywvjOX6U2zRQQ6IbQFK0s= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42/go.mod h1:oDfgXoBBmj+kXnqxDDnIDnC56QBosglKp8ftRCTxR+0= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 h1:7ZApaXzWbo8slc+W5TynuUlB4z66g44h7uqa3/d/BsY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36/go.mod h1:rwr4WnmFi3RJO0M4dxbJtgi9BPLMpVBMX1nUte5ha9U= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 h1:qULF+ElcvjjSEO1+z5x+TmKE9d4yTej7PfpJQPVvexY= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7/go.mod h1:1HKxVrj5wsKy/wb2v07vzTSd+YPV1sDsWxferwPK7PA= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 h1:pdUFDCmsKlwEwVJyq/k3xLBtS/sym3dhBMTCIEDaN40= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8/go.mod h1:EwMPL+Fu95r6yS2UQY99lRR1rDjgCbcPQpy1aQ3fuxE= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= @@ -128,7 +132,6 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaK github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= -github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= From d3ebb8b025a66eaa45e17b4c9fbceaaac72eeca8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 08:28:59 -0500 Subject: [PATCH 111/187] chore(deps): bump github.com/aws/aws-sdk-go-v2 from 1.21.0 to 1.21.1 (#3085) Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.21.0 to 1.21.1. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.21.0...v1.21.1) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark From aa677de755e759162e18daca8cd8fdc64555d897 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Wed, 11 Oct 2023 14:38:45 -0600 Subject: [PATCH 112/187] fix: bump notification-engine to fix double send on self server notifications (#3095) * bump notification-engine to fix double send on self server notifications Signed-off-by: zachaller * codegen Signed-off-by: zachaller --------- Signed-off-by: zachaller Signed-off-by: Philip Clark --- .../generated/notification-services/awssqs.md | 106 ++++++++++++++++++ .../generated/notification-services/github.md | 11 +- .../notification-services/googlechat.md | 19 ++-- .../notification-services/grafana.md | 6 + .../notification-services/overview.md | 1 + docs/generated/notification-services/slack.md | 82 +++++++------- go.mod | 12 +- go.sum | 43 +++++-- mkdocs.yml | 1 + 9 files changed, 220 insertions(+), 61 deletions(-) create mode 100755 docs/generated/notification-services/awssqs.md diff --git a/docs/generated/notification-services/awssqs.md b/docs/generated/notification-services/awssqs.md new file mode 100755 index 0000000000..6bbc47cbbc --- /dev/null +++ b/docs/generated/notification-services/awssqs.md @@ -0,0 +1,106 @@ +# AWS SQS + +## Parameters + +This notification service is capable of sending simple messages to AWS SQS queue. + +* `queue` - name of the queue you are intending to send messages to. Can be overwriten with target destination annotation. +* `region` - region of the sqs queue can be provided via env variable AWS_DEFAULT_REGION +* `key` - optional, aws access key must be either referenced from a secret via variable or via env variable AWS_ACCESS_KEY_ID +* `secret` - optional, aws access secret must be either referenced from a secret via variableor via env variable AWS_SECRET_ACCESS_KEY +* `account` optional, external accountId of the queue +* `endpointUrl` optional, useful for development with localstack + +## Example + +### Using Secret for credential retrieval: + +Resource Annotation: +```yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx-deployment + annotations: + notifications.argoproj.io/subscribe.on-deployment-ready.awssqs: "overwrite-myqueue" +``` + +* ConfigMap +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.awssqs: | + region: "us-east-2" + queue: "myqueue" + account: "1234567" + key: "$awsaccess_key" + secret: "$awsaccess_secret" + + template.deployment-ready: | + message: | + Deployment {{.obj.metadata.name}} is ready! + + trigger.on-deployment-ready: | + - when: any(obj.status.conditions, {.type == 'Available' && .status == 'True'}) + send: [deployment-ready] + - oncePer: obj.metadata.annotations["generation"] + +``` + Secret +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: +stringData: + awsaccess_key: test + awsaccess_secret: test +``` + + +### Minimal configuration using AWS Env variables + +Ensure following list of enviromental variable is injected via OIDC, or other method. And assuming SQS is local to the account. +You may skip usage of secret for sensitive data and omit other parameters. (Setting parameters via ConfigMap takes precedent.) + +Variables: + +```bash +export AWS_ACCESS_KEY_ID="test" +export AWS_SECRET_ACCESS_KEY="test" +export AWS_DEFAULT_REGION="us-east-1" +``` + +Resource Annotation: +```yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx-deployment + annotations: + notifications.argoproj.io/subscribe.on-deployment-ready.awssqs: "" +``` + +* ConfigMap +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.awssqs: | + queue: "myqueue" + + template.deployment-ready: | + message: | + Deployment {{.obj.metadata.name}} is ready! + + trigger.on-deployment-ready: | + - when: any(obj.status.conditions, {.type == 'Available' && .status == 'True'}) + send: [deployment-ready] + - oncePer: obj.metadata.annotations["generation"] + +``` diff --git a/docs/generated/notification-services/github.md b/docs/generated/notification-services/github.md index c24ea00f43..913efef6ec 100755 --- a/docs/generated/notification-services/github.md +++ b/docs/generated/notification-services/github.md @@ -12,7 +12,7 @@ The GitHub notification service changes commit status using [GitHub Apps](https: ## Configuration 1. Create a GitHub Apps using https://github.com/settings/apps/new -2. Change repository permissions to enable write commit statuses and/or deployments +2. Change repository permissions to enable write commit statuses and/or deployments and/or pull requests comments ![2](https://user-images.githubusercontent.com/18019529/108397381-3ca57980-725b-11eb-8d17-5b8992dc009e.png) 3. Generate a private key, and download it automatically ![3](https://user-images.githubusercontent.com/18019529/108397926-d4a36300-725b-11eb-83fe-74795c8c3e03.png) @@ -75,8 +75,17 @@ template.app-deployed: | environmentURL: "https://{{.app.metadata.name}}.example.com" logURL: "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true" requiredContexts: [] + autoMerge: true + pullRequestComment: + content: | + Application {{.app.metadata.name}} is now running new version of deployments manifests. + See more here: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true ``` **Notes**: - If the message is set to 140 characters or more, it will be truncated. - If `github.repoURLPath` and `github.revisionPath` are same as above, they can be omitted. +- Automerge is optional and `true` by default for github deployments to ensure the requested ref is up to date with the default branch. + Setting this option to `false` is required if you would like to deploy older refs in your default branch. + For more information see the [Github Deployment API Docs](https://docs.github.com/en/rest/deployments/deployments?apiVersion=2022-11-28#create-a-deployment). +- If `github.pullRequestComment.content` is set to 65536 characters or more, it will be truncated. diff --git a/docs/generated/notification-services/googlechat.md b/docs/generated/notification-services/googlechat.md index 041ea6e022..fa3bdce8da 100755 --- a/docs/generated/notification-services/googlechat.md +++ b/docs/generated/notification-services/googlechat.md @@ -59,24 +59,27 @@ A card message can be defined as follows: ```yaml template.app-sync-succeeded: | googlechat: - cards: | + cardsV2: | - header: title: ArgoCD Bot Notification sections: - widgets: - - textParagraph: + - decoratedText: text: The app {{ .app.metadata.name }} has successfully synced! - widgets: - - keyValue: + - decoratedText: topLabel: Repository - content: {{ call .repo.RepoURLToHTTPS .app.spec.source.repoURL }} - - keyValue: + text: {{ call .repo.RepoURLToHTTPS .app.spec.source.repoURL }} + - decoratedText: topLabel: Revision - content: {{ .app.spec.source.targetRevision }} - - keyValue: + text: {{ .app.spec.source.targetRevision }} + - decoratedText: topLabel: Author - content: {{ (call .repo.GetCommitMetadata .app.status.sync.revision).Author }} + text: {{ (call .repo.GetCommitMetadata .app.status.sync.revision).Author }} ``` +All [Card fields](https://developers.google.com/chat/api/reference/rest/v1/cards#Card_1) are supported and can be used +in notifications. It is also possible to use the previous (now deprecated) `cards` key to use the legacy card fields, +but this is not recommended as Google has deprecated this field and recommends using the newer `cardsV2`. The card message can be written in JSON too. diff --git a/docs/generated/notification-services/grafana.md b/docs/generated/notification-services/grafana.md index ff567b71c1..a36672d0fa 100755 --- a/docs/generated/notification-services/grafana.md +++ b/docs/generated/notification-services/grafana.md @@ -4,6 +4,12 @@ To be able to create Grafana annotation with argocd-notifications you have to cr ![sample](https://user-images.githubusercontent.com/18019529/112024976-0f106080-8b78-11eb-9658-7663305899be.png) +Available parameters : + +* `apiURL` - the server url, e.g. https://grafana.example.com +* `apiKey` - the API key for the serviceaccount +* `insecureSkipVerify` - optional bool, true or false + 1. Login to your Grafana instance as `admin` 2. On the left menu, go to Configuration / API Keys 3. Click "Add API Key" diff --git a/docs/generated/notification-services/overview.md b/docs/generated/notification-services/overview.md index 15e674f654..265e575755 100755 --- a/docs/generated/notification-services/overview.md +++ b/docs/generated/notification-services/overview.md @@ -38,6 +38,7 @@ metadata: ## Service Types +* [AwsSqs](./awssqs.md) * [Email](./email.md) * [GitHub](./github.md) * [Slack](./slack.md) diff --git a/docs/generated/notification-services/slack.md b/docs/generated/notification-services/slack.md index 876445bfec..15937597c1 100755 --- a/docs/generated/notification-services/slack.md +++ b/docs/generated/notification-services/slack.md @@ -29,56 +29,56 @@ The Slack notification service configuration includes following settings: 1. Invite your slack bot to this channel **otherwise slack bot won't be able to deliver notifications to this channel** 1. Store Oauth access token in `argocd-notifications-secret` secret -```yaml - apiVersion: v1 - kind: Secret - metadata: - name: - stringData: - slack-token: -``` + ```yaml + apiVersion: v1 + kind: Secret + metadata: + name: + stringData: + slack-token: + ``` 1. Define service type slack in data section of `argocd-notifications-cm` configmap: -```yaml - apiVersion: v1 - kind: ConfigMap - metadata: - name: - data: - service.slack: | - token: $slack-token -``` + ```yaml + apiVersion: v1 + kind: ConfigMap + metadata: + name: + data: + service.slack: | + token: $slack-token + ``` 1. Add annotation in application yaml file to enable notifications for specific argocd app. The following example uses the [on-sync-succeeded trigger](../catalog.md#triggers): -```yaml - apiVersion: argoproj.io/v1alpha1 - kind: Application - metadata: - annotations: - notifications.argoproj.io/subscribe.on-sync-succeeded.slack: my_channel -``` + ```yaml + apiVersion: argoproj.io/v1alpha1 + kind: Application + metadata: + annotations: + notifications.argoproj.io/subscribe.on-sync-succeeded.slack: my_channel + ``` 1. Annotation with more than one [trigger](../catalog.md#triggers), with multiple destinations and recipients -```yaml - apiVersion: argoproj.io/v1alpha1 - kind: Application - metadata: - annotations: - notifications.argoproj.io/subscriptions: | - - trigger: [on-scaling-replica-set, on-rollout-updated, on-rollout-step-completed] - destinations: - - service: slack - recipients: [my-channel-1, my-channel-2] - - service: email - recipients: [recipient-1, recipient-2, recipient-3 ] - - trigger: [on-rollout-aborted, on-analysis-run-failed, on-analysis-run-error] - destinations: - - service: slack - recipients: [my-channel-21, my-channel-22] -``` + ```yaml + apiVersion: argoproj.io/v1alpha1 + kind: Application + metadata: + annotations: + notifications.argoproj.io/subscriptions: | + - trigger: [on-scaling-replica-set, on-rollout-updated, on-rollout-step-completed] + destinations: + - service: slack + recipients: [my-channel-1, my-channel-2] + - service: email + recipients: [recipient-1, recipient-2, recipient-3 ] + - trigger: [on-rollout-aborted, on-analysis-run-failed, on-analysis-run-error] + destinations: + - service: slack + recipients: [my-channel-21, my-channel-22] + ``` ## Templates diff --git a/go.mod b/go.mod index 546e3c00b1..960313468e 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/antonmedv/expr v1.15.3 - github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 + github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.1 github.com/aws/aws-sdk-go-v2/config v1.18.43 @@ -88,6 +88,7 @@ require ( github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect + github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect @@ -120,10 +121,13 @@ require ( github.com/google/go-github/v53 v53.0.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect + github.com/google/s2a-go v0.1.4 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect + github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect - github.com/gregdel/pushover v1.1.0 // indirect + github.com/gregdel/pushover v1.2.1 // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v0.14.1 // indirect @@ -162,7 +166,7 @@ require ( github.com/prometheus/procfs v0.10.1 // indirect github.com/shopspring/decimal v1.2.0 // indirect github.com/slack-go/slack v0.12.2 // indirect - github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/cast v1.5.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.0 // indirect github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80 // indirect @@ -170,6 +174,7 @@ require ( github.com/valyala/fastjson v1.6.3 // indirect github.com/whilp/git-urls v0.0.0-20191001220047-6db9661140c0 // indirect github.com/xlab/treeprint v1.1.0 // indirect + go.opencensus.io v0.24.0 // indirect go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect golang.org/x/crypto v0.11.0 // indirect golang.org/x/mod v0.8.0 // indirect @@ -182,6 +187,7 @@ require ( golang.org/x/tools v0.6.0 // indirect gomodules.xyz/envconfig v1.3.1-0.20190308184047-426f31af0d45 // indirect gomodules.xyz/notify v0.1.1 // indirect + google.golang.org/api v0.132.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect diff --git a/go.sum b/go.sum index 5f95f72576..921fda31fc 100644 --- a/go.sum +++ b/go.sum @@ -94,8 +94,8 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= -github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= -github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= +github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee h1:ZYILioq4v6OIsr7uh0Pcx7JY4KpJ9qs8qbjRqM6HWMY= +github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee/go.mod h1:VG9FXG0ddIVGc7NcSTRapaUjCPCYqOji//z6mmBYwCE= github.com/argoproj/pkg v0.13.6 h1:36WPD9MNYECHcO1/R1pj6teYspiK7uMQLCgLGft2abM= github.com/argoproj/pkg v0.13.6/go.mod h1:I698DoJBKuvNFaixh4vFl2C88cNIT1WS7KCbz5ewyF8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= @@ -103,6 +103,7 @@ github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2z github.com/aws/aws-sdk-go v1.44.39/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go-v2 v1.17.3/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= github.com/aws/aws-sdk-go-v2 v1.21.1 h1:wjHYshtPpYOZm+/mu3NhVgRRc0baM6LJZOmxPZ5Cwzs= github.com/aws/aws-sdk-go-v2 v1.21.1/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= @@ -112,9 +113,11 @@ github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9r github.com/aws/aws-sdk-go-v2/credentials v1.13.41/go.mod h1:cc3Fn7DkKbJalPtQnudHGZZ8ml9+hwtbc1CJONsYYqk= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.27/go.mod h1:a1/UpzeyBBerajpnP5nGZa9mGzsBn5cOKxm6NWQsvoI= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 h1:817VqVe6wvwE46xXy6YF5RywvjOX6U2zRQQ6IbQFK0s= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42/go.mod h1:oDfgXoBBmj+kXnqxDDnIDnC56QBosglKp8ftRCTxR+0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.21/go.mod h1:+Gxn8jYn5k9ebfHEqlhrMirFjSW0v0C9fI+KN5vk2kE= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 h1:7ZApaXzWbo8slc+W5TynuUlB4z66g44h7uqa3/d/BsY= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36/go.mod h1:rwr4WnmFi3RJO0M4dxbJtgi9BPLMpVBMX1nUte5ha9U= @@ -126,12 +129,15 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeo github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= +github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0 h1:tQoMg8i4nFAB70cJ4wiAYEiZRYo2P6uDmU2D6ys/igo= +github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0/go.mod h1:jQhN5f4p3PALMNlUtfb/0wGIFlV7vGtJlPDVfxfNfPY= github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 h1:vuGK1vHNP9zx0PfOrtPumbwR2af0ATQ1Z2H6p75AgRQ= github.com/aws/aws-sdk-go-v2/service/sso v1.15.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= @@ -170,7 +176,11 @@ github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEM github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -205,6 +215,7 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0yf/KaRKURN6nyi7A9IZydMivZEm9oQLWNjfKDc= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -222,7 +233,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/getkin/kin-openapi v0.94.0/go.mod h1:LWZfzOd7PRy8GJ1dJ6mCU6tNdSfOwRac1BUPam4aw6Q= @@ -344,6 +355,7 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -372,14 +384,20 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvkiqTYKBCKLNmlge2eVjoZfySzM= +github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= @@ -392,8 +410,8 @@ github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoA github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gregdel/pushover v1.1.0 h1:dwHyvrcpZCOS9V1fAnKPaGRRI5OC55cVaKhMybqNsKQ= -github.com/gregdel/pushover v1.1.0/go.mod h1:EcaO66Nn1StkpEm1iKtBTV3d2A16SoMsVER1PthX7to= +github.com/gregdel/pushover v1.2.1 h1:IPPJCdzXz60gMqnlzS0ZAW5z5aS1gI4nU+YM0Pe+ssA= +github.com/gregdel/pushover v1.2.1/go.mod h1:EcaO66Nn1StkpEm1iKtBTV3d2A16SoMsVER1PthX7to= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= @@ -627,8 +645,8 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= @@ -658,8 +676,8 @@ github.com/spaceapegames/go-wavefront v1.8.1/go.mod h1:GtdIjtJ0URkfPmaKx0+7vMSDv github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= +github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= @@ -685,6 +703,7 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= @@ -721,6 +740,8 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee331t6JAXeK2bcyhLOOc= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= @@ -739,6 +760,7 @@ golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220513210258-46612604a0f9/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= @@ -948,6 +970,7 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= @@ -1041,6 +1064,8 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.132.0 h1:8t2/+qZ26kAOGSmOiHwVycqVaDg7q3JDILrNi/Z6rvc= +google.golang.org/api v0.132.0/go.mod h1:AeTBC6GpJnJSRJjktDcPX0QwtS8pGYZOV6MSuSCusw0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1099,8 +1124,10 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/mkdocs.yml b/mkdocs.yml index 471359c778..8506973d4f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -75,6 +75,7 @@ nav: - Overview: features/notifications.md - Services: - generated/notification-services/alertmanager.md + - generated/notification-services/awssqs.md - generated/notification-services/email.md - generated/notification-services/github.md - generated/notification-services/googlechat.md From 37a22dba9323fc0b460ab751df7d4e70eb97d143 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Thu, 12 Oct 2023 13:00:01 -0600 Subject: [PATCH 113/187] fix: keep rs informer updated (#3091) * keep rs informer updated Signed-off-by: zachaller * correct bad log Signed-off-by: zachaller * add error context Signed-off-by: zachaller --------- Signed-off-by: zachaller Signed-off-by: Philip Clark --- rollout/controller.go | 3 ++- rollout/replicaset.go | 4 +++- rollout/replicaset_test.go | 21 +++++++++++++++++---- rollout/sync.go | 10 +++++++++- 4 files changed, 31 insertions(+), 7 deletions(-) diff --git a/rollout/controller.go b/rollout/controller.go index ebc17c1303..1d7d8cde92 100644 --- a/rollout/controller.go +++ b/rollout/controller.go @@ -132,6 +132,7 @@ type reconcilerBase struct { replicaSetSynced cache.InformerSynced rolloutsInformer cache.SharedIndexInformer rolloutsLister listers.RolloutLister + replicaSetInformer cache.SharedIndexInformer rolloutsSynced cache.InformerSynced rolloutsIndexer cache.Indexer servicesLister v1.ServiceLister @@ -176,7 +177,6 @@ func NewController(cfg ControllerConfig) *Controller { controllerutil.EnqueueAfter(obj, duration, cfg.RolloutWorkQueue) }, } - base := reconcilerBase{ kubeclientset: cfg.KubeClientSet, argoprojclientset: cfg.ArgoProjClientset, @@ -185,6 +185,7 @@ func NewController(cfg ControllerConfig) *Controller { replicaSetLister: cfg.ReplicaSetInformer.Lister(), replicaSetSynced: cfg.ReplicaSetInformer.Informer().HasSynced, rolloutsInformer: cfg.RolloutsInformer.Informer(), + replicaSetInformer: cfg.ReplicaSetInformer.Informer(), rolloutsIndexer: cfg.RolloutsInformer.Informer().GetIndexer(), rolloutsLister: cfg.RolloutsInformer.Lister(), rolloutsSynced: cfg.RolloutsInformer.Informer().HasSynced, diff --git a/rollout/replicaset.go b/rollout/replicaset.go index dceff65aa0..fad23e756e 100644 --- a/rollout/replicaset.go +++ b/rollout/replicaset.go @@ -35,6 +35,7 @@ func (c *rolloutContext) removeScaleDownDelay(rs *appsv1.ReplicaSet) error { _, err := c.kubeclientset.AppsV1().ReplicaSets(rs.Namespace).Patch(ctx, rs.Name, patchtypes.JSONPatchType, []byte(patch), metav1.PatchOptions{}) if err == nil { c.log.Infof("Removed '%s' annotation from RS '%s'", v1alpha1.DefaultReplicaSetScaleDownDeadlineAnnotationKey, rs.Name) + c.replicaSetInformer.GetIndexer().Update(rs) } return err } @@ -56,9 +57,10 @@ func (c *rolloutContext) addScaleDownDelay(rs *appsv1.ReplicaSet, scaleDownDelay } deadline := timeutil.MetaNow().Add(scaleDownDelaySeconds).UTC().Format(time.RFC3339) patch := fmt.Sprintf(addScaleDownAtAnnotationsPatch, v1alpha1.DefaultReplicaSetScaleDownDeadlineAnnotationKey, deadline) - _, err := c.kubeclientset.AppsV1().ReplicaSets(rs.Namespace).Patch(ctx, rs.Name, patchtypes.JSONPatchType, []byte(patch), metav1.PatchOptions{}) + rs, err := c.kubeclientset.AppsV1().ReplicaSets(rs.Namespace).Patch(ctx, rs.Name, patchtypes.JSONPatchType, []byte(patch), metav1.PatchOptions{}) if err == nil { c.log.Infof("Set '%s' annotation on '%s' to %s (%s)", v1alpha1.DefaultReplicaSetScaleDownDeadlineAnnotationKey, rs.Name, deadline, scaleDownDelaySeconds) + c.replicaSetInformer.GetIndexer().Update(rs) } return err } diff --git a/rollout/replicaset_test.go b/rollout/replicaset_test.go index 26b05b5b54..10c1dc0893 100644 --- a/rollout/replicaset_test.go +++ b/rollout/replicaset_test.go @@ -195,16 +195,29 @@ func TestReconcileNewReplicaSet(t *testing.T) { rollout := newBlueGreenRollout("foo", test.rolloutReplicas, nil, "", "") fake := fake.Clientset{} k8sfake := k8sfake.Clientset{} + + f := newFixture(t) + defer f.Close() + f.objects = append(f.objects, rollout) + f.replicaSetLister = append(f.replicaSetLister, oldRS, newRS) + f.kubeobjects = append(f.kubeobjects, oldRS, newRS) + _, informers, k8sInformer := f.newController(noResyncPeriodFunc) + stopCh := make(chan struct{}) + informers.Start(stopCh) + informers.WaitForCacheSync(stopCh) + close(stopCh) + roCtx := rolloutContext{ log: logutil.WithRollout(rollout), rollout: rollout, newRS: newRS, stableRS: oldRS, reconcilerBase: reconcilerBase{ - argoprojclientset: &fake, - kubeclientset: &k8sfake, - recorder: record.NewFakeEventRecorder(), - resyncPeriod: 30 * time.Second, + argoprojclientset: &fake, + kubeclientset: &k8sfake, + recorder: record.NewFakeEventRecorder(), + resyncPeriod: 30 * time.Second, + replicaSetInformer: k8sInformer.Apps().V1().ReplicaSets().Informer(), }, pauseContext: &pauseContext{ rollout: rollout, diff --git a/rollout/sync.go b/rollout/sync.go index f13a3489c7..25c0c14813 100644 --- a/rollout/sync.go +++ b/rollout/sync.go @@ -85,7 +85,14 @@ func (c *rolloutContext) syncReplicaSetRevision() (*appsv1.ReplicaSet, error) { if annotationsUpdated || minReadySecondsNeedsUpdate || affinityNeedsUpdate { rsCopy.Spec.MinReadySeconds = c.rollout.Spec.MinReadySeconds rsCopy.Spec.Template.Spec.Affinity = replicasetutil.GenerateReplicaSetAffinity(*c.rollout) - return c.kubeclientset.AppsV1().ReplicaSets(rsCopy.ObjectMeta.Namespace).Update(ctx, rsCopy, metav1.UpdateOptions{}) + rs, err := c.kubeclientset.AppsV1().ReplicaSets(rsCopy.ObjectMeta.Namespace).Update(ctx, rsCopy, metav1.UpdateOptions{}) + if err != nil { + c.log.WithError(err).Error("Error: updating replicaset revision") + return nil, fmt.Errorf("error updating replicaset revision: %v", err) + } + c.log.Infof("Synced revision on ReplicaSet '%s' to '%s'", rs.Name, newRevision) + c.replicaSetInformer.GetIndexer().Update(rs) + return rs, nil } // Should use the revision in existingNewRS's annotation, since it set by before @@ -370,6 +377,7 @@ func (c *rolloutContext) scaleReplicaSet(rs *appsv1.ReplicaSet, newScale int32, scaled = true revision, _ := replicasetutil.Revision(rs) c.recorder.Eventf(rollout, record.EventOptions{EventReason: conditions.ScalingReplicaSetReason}, conditions.ScalingReplicaSetMessage, scalingOperation, rs.Name, revision, oldScale, newScale) + c.replicaSetInformer.GetIndexer().Update(rs) } } return scaled, rs, err From cc80287dcd00b88bc1d720dbd4acc57d73e88e61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 14:00:20 -0500 Subject: [PATCH 114/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.43 to 1.18.44 (#3099) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.43 to 1.18.44. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.43...config/v1.18.44) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 16 ++++++++-------- go.sum | 32 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/go.mod b/go.mod index 960313468e..5f235803b0 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.1 - github.com/aws/aws-sdk-go-v2/config v1.18.43 + github.com/aws/aws-sdk-go-v2/config v1.18.44 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,16 +82,16 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.41 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.42 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.12 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.3.44 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.36 // indirect github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.15.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.23.1 // indirect github.com/aws/smithy-go v1.15.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect diff --git a/go.sum b/go.sum index 921fda31fc..28a9b2f2cd 100644 --- a/go.sum +++ b/go.sum @@ -107,12 +107,12 @@ github.com/aws/aws-sdk-go-v2 v1.17.3/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3eP github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= github.com/aws/aws-sdk-go-v2 v1.21.1 h1:wjHYshtPpYOZm+/mu3NhVgRRc0baM6LJZOmxPZ5Cwzs= github.com/aws/aws-sdk-go-v2 v1.21.1/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= -github.com/aws/aws-sdk-go-v2/config v1.18.43 h1:IgdUtTRvUDC6eiJBqU6vh7bHFNAEBjQ8S+qJ7zVhDOs= -github.com/aws/aws-sdk-go-v2/config v1.18.43/go.mod h1:NiFev8qlgg8MPzw3fO/EwzMZeZwlJEKGwfpjRPA9Nvw= -github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9rmEzEhbZFh9JQW/Bg= -github.com/aws/aws-sdk-go-v2/credentials v1.13.41/go.mod h1:cc3Fn7DkKbJalPtQnudHGZZ8ml9+hwtbc1CJONsYYqk= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= +github.com/aws/aws-sdk-go-v2/config v1.18.44 h1:U10NQ3OxiY0dGGozmVIENIDnCT0W432PWxk2VO8wGnY= +github.com/aws/aws-sdk-go-v2/config v1.18.44/go.mod h1:pHxnQBldd0heEdJmolLBk78D1Bf69YnKLY3LOpFImlU= +github.com/aws/aws-sdk-go-v2/credentials v1.13.42 h1:KMkjpZqcMOwtRHChVlHdNxTUUAC6NC/b58mRZDIdcRg= +github.com/aws/aws-sdk-go-v2/credentials v1.13.42/go.mod h1:7ltKclhvEB8305sBhrpls24HGxORl6qgnQqSJ314Uw8= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.12 h1:3j5lrl9kVQrJ1BU4O0z7MQ8sa+UXdiLuo4j0V+odNI8= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.12/go.mod h1:JbFpcHDBdsex1zpIKuVRorZSQiZEyc3MykNCcjgz174= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.27/go.mod h1:a1/UpzeyBBerajpnP5nGZa9mGzsBn5cOKxm6NWQsvoI= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 h1:817VqVe6wvwE46xXy6YF5RywvjOX6U2zRQQ6IbQFK0s= @@ -121,22 +121,22 @@ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.21/go.mod h1:+Gxn8jYn5k9 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 h1:7ZApaXzWbo8slc+W5TynuUlB4z66g44h7uqa3/d/BsY= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36/go.mod h1:rwr4WnmFi3RJO0M4dxbJtgi9BPLMpVBMX1nUte5ha9U= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.44 h1:quOJOqlbSfeJTboXLjYXM1M9T52LBXqLoTPlmsKLpBo= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.44/go.mod h1:LNy+P1+1LiRcCsVYr/4zG5n8zWFL0xsvZkOybjbftm8= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 h1:pdUFDCmsKlwEwVJyq/k3xLBtS/sym3dhBMTCIEDaN40= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8/go.mod h1:EwMPL+Fu95r6yS2UQY99lRR1rDjgCbcPQpy1aQ3fuxE= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.36 h1:YXlm7LxwNlauqb2OrinWlcvtsflTzP8GaMvYfQBhoT4= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.36/go.mod h1:ou9ffqJ9hKOVZmjlC6kQ6oROAyG1M4yBKzR+9BKbDwk= github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0 h1:tQoMg8i4nFAB70cJ4wiAYEiZRYo2P6uDmU2D6ys/igo= github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0/go.mod h1:jQhN5f4p3PALMNlUtfb/0wGIFlV7vGtJlPDVfxfNfPY= -github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 h1:vuGK1vHNP9zx0PfOrtPumbwR2af0ATQ1Z2H6p75AgRQ= -github.com/aws/aws-sdk-go-v2/service/sso v1.15.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= -github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= -github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.1 h1:ZN3bxw9OYC5D6umLw6f57rNJfGfhg1DIAAcKpzyUTOE= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.1/go.mod h1:PieckvBoT5HtyB9AsJRrYZFY2Z+EyfVM/9zG6gbV8DQ= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.2 h1:fSCCJuT5i6ht8TqGdZc5Q5K9pz/atrf7qH4iK5C9XzU= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.2/go.mod h1:5eNtr+vNc5vVd92q7SJ+U/HszsIdhZBEyi9dkMRKsp8= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.1 h1:ASNYk1ypWAxRhJjKS0jBnTUeDl7HROOpeSMu1xDA/I8= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.1/go.mod h1:2cnsAhVT3mqusovc2stUSUrSBGTcX9nh8Tu6xh//2eI= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= From cb2578fbfc0cb529d0d749d5fc506f65bcdf0c16 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 14:00:41 -0500 Subject: [PATCH 115/187] chore(deps): bump google.golang.org/grpc from 1.58.2 to 1.58.3 (#3098) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.2 to 1.58.3. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.58.2...v1.58.3) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5f235803b0..6d5a1d7515 100644 --- a/go.mod +++ b/go.mod @@ -37,7 +37,7 @@ require ( github.com/tj/assert v0.0.3 github.com/valyala/fasttemplate v1.2.2 google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 - google.golang.org/grpc v1.58.2 + google.golang.org/grpc v1.58.3 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.8 diff --git a/go.sum b/go.sum index 28a9b2f2cd..e0641f0d22 100644 --- a/go.sum +++ b/go.sum @@ -1128,8 +1128,8 @@ google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= -google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= +google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From d11e20033ce4818fd0384a2d0e8b8371facae49f Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Fri, 13 Oct 2023 09:52:51 -0400 Subject: [PATCH 116/187] reduce complexity of filters Signed-off-by: Philip Clark --- .../rollouts-home/rollouts-home.tsx | 53 ++++++++++--------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index cb2fde0a00..b81bf2d6d4 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -8,6 +8,7 @@ import {useWatchRollouts} from '../../shared/services/rollout'; import {RolloutsToolbar, defaultDisplayMode, Filters} from '../rollouts-toolbar/rollouts-toolbar'; import {RolloutsTable} from '../rollouts-table/rollouts-table'; import {RolloutsGrid} from '../rollouts-grid/rollouts-grid'; +import {RolloutRolloutInfo } from '../../../models/rollout/generated'; import './rollouts-home.scss'; export const RolloutsHome = () => { @@ -49,33 +50,33 @@ export const RolloutsHome = () => { localStorage.setItem('rolloutsFavorites', JSON.stringify(newFavorites)); }; + const isFavorite = (r: RolloutRolloutInfo) => filters.showFavorites && !favorites[r.objectMeta.name]; + + const requiresAttention = (r: RolloutRolloutInfo) => filters.showRequiresAttention && r.status !== 'Degraded' && r.status !== 'Paused' && r.message !== 'CanaryPauseStep'; + + const hasStatusFilter = (r: RolloutRolloutInfo) => Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]; + + const nameMatches = (r: RolloutRolloutInfo) => { + let nameMatches = false; + for (let term of filters.name.split(',').map((t) => t.trim())) { + if (term === '') continue; // Skip empty terms + if (term.startsWith('!')) { + if (!r.objectMeta.name.includes(term.substring(1))) { + nameMatches = true; + break; + } + } else if (r.objectMeta.name.includes(term)) { + nameMatches = true; + break; + } + } + return filters.name === '' || nameMatches; + }; + const filteredRollouts = React.useMemo(() => { - return rollouts.filter((r) => { - if (filters.showFavorites && !favorites[r.objectMeta.name]) { - return false; - } - if (filters.showRequiresAttention && r.status !== 'Degraded' && r.status !== 'Paused' && r.message !== 'CanaryPauseStep') { - return false; - } - if (Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]) { - return false; - } - let nameMatches = false; - for (let term of filters.name.split(',').map((t) => t.trim())) { - if (term === '') continue; // Skip empty terms - if (term.startsWith('!')) { - if (!r.objectMeta.name.includes(term.substring(1))) { - nameMatches = true; - break; - } - } else if (r.objectMeta.name.includes(term)) { - nameMatches = true; - break; - } - } - if (filters.name != '' && !nameMatches) return false; - return true; - }); + return rollouts.filter((r) => { + return isFavorite(r) || requiresAttention(r) || hasStatusFilter(r) || nameMatches(r); + }); }, [rollouts, filters, favorites]); return ( From 55866e131b7e4eb0c78ce9468bc9645f03a8c43f Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Fri, 13 Oct 2023 10:51:46 -0400 Subject: [PATCH 117/187] filters logic working Signed-off-by: Philip Clark --- .../rollouts-home/rollouts-home.tsx | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index b81bf2d6d4..4329c6b952 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -50,11 +50,17 @@ export const RolloutsHome = () => { localStorage.setItem('rolloutsFavorites', JSON.stringify(newFavorites)); }; - const isFavorite = (r: RolloutRolloutInfo) => filters.showFavorites && !favorites[r.objectMeta.name]; + const isFavorite = (r: RolloutRolloutInfo) => { + return filters.showFavorites && favorites[r.objectMeta.name]; + } - const requiresAttention = (r: RolloutRolloutInfo) => filters.showRequiresAttention && r.status !== 'Degraded' && r.status !== 'Paused' && r.message !== 'CanaryPauseStep'; + const requiresAttention = (r: RolloutRolloutInfo) => { + return filters.showRequiresAttention && (r.status === 'Degraded' || (r.status === 'Paused' && r.message !== 'CanaryPauseStep')); + } - const hasStatusFilter = (r: RolloutRolloutInfo) => Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]; + const hasStatusFilter = (r: RolloutRolloutInfo) => { + return filters.status[r.status]; + } const nameMatches = (r: RolloutRolloutInfo) => { let nameMatches = false; @@ -74,9 +80,14 @@ export const RolloutsHome = () => { }; const filteredRollouts = React.useMemo(() => { - return rollouts.filter((r) => { - return isFavorite(r) || requiresAttention(r) || hasStatusFilter(r) || nameMatches(r); - }); + return rollouts.filter((r) => { + // Only include the status filter if one of them is enabled + if (Object.values(filters.status).some((v: boolean) => v === true)) { + return isFavorite(r) || requiresAttention(r) || nameMatches(r) || hasStatusFilter(r); + } else { + return isFavorite(r) || requiresAttention(r) || nameMatches(r); + } + }); }, [rollouts, filters, favorites]); return ( From 82da9c8fdc8da31c450d5e146b768a1dd1d9735d Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Sat, 14 Oct 2023 21:45:50 -0400 Subject: [PATCH 118/187] fix filters Signed-off-by: Philip Clark --- .../rollouts-home/rollouts-home.tsx | 58 ++++++++----------- 1 file changed, 23 insertions(+), 35 deletions(-) diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index 4329c6b952..cb2fde0a00 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -8,7 +8,6 @@ import {useWatchRollouts} from '../../shared/services/rollout'; import {RolloutsToolbar, defaultDisplayMode, Filters} from '../rollouts-toolbar/rollouts-toolbar'; import {RolloutsTable} from '../rollouts-table/rollouts-table'; import {RolloutsGrid} from '../rollouts-grid/rollouts-grid'; -import {RolloutRolloutInfo } from '../../../models/rollout/generated'; import './rollouts-home.scss'; export const RolloutsHome = () => { @@ -50,43 +49,32 @@ export const RolloutsHome = () => { localStorage.setItem('rolloutsFavorites', JSON.stringify(newFavorites)); }; - const isFavorite = (r: RolloutRolloutInfo) => { - return filters.showFavorites && favorites[r.objectMeta.name]; - } - - const requiresAttention = (r: RolloutRolloutInfo) => { - return filters.showRequiresAttention && (r.status === 'Degraded' || (r.status === 'Paused' && r.message !== 'CanaryPauseStep')); - } - - const hasStatusFilter = (r: RolloutRolloutInfo) => { - return filters.status[r.status]; - } - - const nameMatches = (r: RolloutRolloutInfo) => { - let nameMatches = false; - for (let term of filters.name.split(',').map((t) => t.trim())) { - if (term === '') continue; // Skip empty terms - if (term.startsWith('!')) { - if (!r.objectMeta.name.includes(term.substring(1))) { - nameMatches = true; - break; - } - } else if (r.objectMeta.name.includes(term)) { - nameMatches = true; - break; - } - } - return filters.name === '' || nameMatches; - }; - const filteredRollouts = React.useMemo(() => { return rollouts.filter((r) => { - // Only include the status filter if one of them is enabled - if (Object.values(filters.status).some((v: boolean) => v === true)) { - return isFavorite(r) || requiresAttention(r) || nameMatches(r) || hasStatusFilter(r); - } else { - return isFavorite(r) || requiresAttention(r) || nameMatches(r); + if (filters.showFavorites && !favorites[r.objectMeta.name]) { + return false; + } + if (filters.showRequiresAttention && r.status !== 'Degraded' && r.status !== 'Paused' && r.message !== 'CanaryPauseStep') { + return false; + } + if (Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]) { + return false; + } + let nameMatches = false; + for (let term of filters.name.split(',').map((t) => t.trim())) { + if (term === '') continue; // Skip empty terms + if (term.startsWith('!')) { + if (!r.objectMeta.name.includes(term.substring(1))) { + nameMatches = true; + break; + } + } else if (r.objectMeta.name.includes(term)) { + nameMatches = true; + break; + } } + if (filters.name != '' && !nameMatches) return false; + return true; }); }, [rollouts, filters, favorites]); From 77724ea7d32d67916f1891dfa41fa75ca981de1c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:10:56 -0500 Subject: [PATCH 119/187] chore(deps): bump docker/setup-buildx-action from 2.10.0 to 3.0.0 (#3034) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.10.0 to 3.0.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/885d1462b80bc1c1c7f0b00334ad271f09369c55...f95db51fddba0c2d1ec667646a06c2ce06100226) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/image-reuse.yaml | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index c90b286b10..adcbe86473 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -79,7 +79,7 @@ jobs: cosign-release: 'v2.0.2' - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 - - uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0 + - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Setup tags for container image as a CSV type run: | diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6ac65d4be1..918958b729 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -99,7 +99,7 @@ jobs: uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0 + uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Generate release artifacts run: | From 4a0ffbecbc6c039af3fedf4e02d6c148747df62a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:11:35 -0500 Subject: [PATCH 120/187] chore(deps): bump docker/build-push-action from 4.1.1 to 5.0.0 (#3033) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.1.1 to 5.0.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/2eb1c1961a95fc15694676618e422e8ba1d63825...0565240e2d4ab88bba5387d719585280857ece09) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/image-reuse.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index adcbe86473..6c98cb9bfc 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -130,7 +130,7 @@ jobs: - name: Build and push container image id: image - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 #v4.1.1 + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 #v5.0.0 with: context: . platforms: ${{ inputs.platforms }} From cd37fedab02ea9b9d9f90a1a3c935287081b87f5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:12:01 -0500 Subject: [PATCH 121/187] chore(deps): bump docker/metadata-action from 4 to 5 (#3032) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4 to 5. - [Release notes](https://github.com/docker/metadata-action/releases) - [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md) - [Commits](https://github.com/docker/metadata-action/compare/v4...v5) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/docker-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 1a51e2a485..c762c89c29 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -28,7 +28,7 @@ jobs: steps: - name: Docker meta (controller) id: controller-meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | quay.io/argoproj/argo-rollouts @@ -38,7 +38,7 @@ jobs: - name: Docker meta (plugin) id: plugin-meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | quay.io/argoproj/kubectl-argo-rollouts From 39723f2622e395edbbc56186a01f474c6b1bd190 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:12:43 -0500 Subject: [PATCH 122/187] chore(deps): bump github.com/evanphx/json-patch/v5 from 5.6.0 to 5.7.0 (#3030) Bumps [github.com/evanphx/json-patch/v5](https://github.com/evanphx/json-patch) from 5.6.0 to 5.7.0. - [Release notes](https://github.com/evanphx/json-patch/releases) - [Commits](https://github.com/evanphx/json-patch/compare/v5.6.0...v5.7.0) --- updated-dependencies: - dependency-name: github.com/evanphx/json-patch/v5 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e747a4983c..1e6633fa29 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible github.com/bombsimon/logrusr/v4 v4.0.0 - github.com/evanphx/json-patch/v5 v5.6.0 + github.com/evanphx/json-patch/v5 v5.7.0 github.com/gogo/protobuf v1.3.2 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.3 diff --git a/go.sum b/go.sum index da8d8cf479..837eaee024 100644 --- a/go.sum +++ b/go.sum @@ -206,8 +206,8 @@ github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0 github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= +github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= From 7bb25b8b570c1077c70078c5a031f0afb22f0f7c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:13:13 -0500 Subject: [PATCH 123/187] chore(deps): bump google.golang.org/grpc from 1.57.0 to 1.58.0 (#3023) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.57.0 to 1.58.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.57.0...v1.58.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 22 +++++++++++----------- go.sum | 40 +++++++++++++++++++++++----------------- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/go.mod b/go.mod index 1e6633fa29..d809ee3e2d 100644 --- a/go.mod +++ b/go.mod @@ -36,8 +36,8 @@ require ( github.com/stretchr/testify v1.8.4 github.com/tj/assert v0.0.3 github.com/valyala/fasttemplate v1.2.2 - google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 - google.golang.org/grpc v1.57.0 + google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 + google.golang.org/grpc v1.58.0 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.8 @@ -57,7 +57,7 @@ require ( ) require ( - cloud.google.com/go/compute v1.19.1 // indirect + cloud.google.com/go/compute v1.21.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.27 // indirect @@ -171,20 +171,20 @@ require ( github.com/whilp/git-urls v0.0.0-20191001220047-6db9661140c0 // indirect github.com/xlab/treeprint v1.1.0 // indirect go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect - golang.org/x/crypto v0.7.0 // indirect + golang.org/x/crypto v0.11.0 // indirect golang.org/x/mod v0.8.0 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect + golang.org/x/net v0.12.0 // indirect + golang.org/x/oauth2 v0.10.0 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/term v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.6.0 // indirect gomodules.xyz/envconfig v1.3.1-0.20190308184047-426f31af0d45 // indirect gomodules.xyz/notify v0.1.1 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect + google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/go.sum b/go.sum index 837eaee024..582dc24d37 100644 --- a/go.sum +++ b/go.sum @@ -19,8 +19,8 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.19.1 h1:am86mquDUgjGNWxiGn+5PGLbmgiWXlE/yNWpIpNvuXY= -cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= +cloud.google.com/go/compute v1.21.0 h1:JNBsyXVoOoNJtTQcnEY5uYpZIbeCTYIeDe0Xh1bySMk= +cloud.google.com/go/compute v1.21.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= @@ -739,8 +739,9 @@ golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220513210258-46612604a0f9/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -826,16 +827,18 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= +golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= +golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -849,7 +852,7 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -920,16 +923,18 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -942,8 +947,9 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1070,12 +1076,12 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 h1:9NWlQfY2ePejTmfwUH1OWwmznFa+0kKcHGPDvcPza9M= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 h1:m8v1xLLLzMe1m5P+gCTF8nJB9epwZQUBERm20Oy1poQ= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= +google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= +google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= +google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1091,8 +1097,8 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= -google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= +google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o= +google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 626ca45dae8eb320190017c59d5eb50c175d90e6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 12:12:13 -0500 Subject: [PATCH 124/187] chore(deps): bump google.golang.org/grpc from 1.58.0 to 1.58.2 (#3050) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.0 to 1.58.2. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.58.0...v1.58.2) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d809ee3e2d..0790b439cd 100644 --- a/go.mod +++ b/go.mod @@ -37,7 +37,7 @@ require ( github.com/tj/assert v0.0.3 github.com/valyala/fasttemplate v1.2.2 google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 - google.golang.org/grpc v1.58.0 + google.golang.org/grpc v1.58.2 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.8 diff --git a/go.sum b/go.sum index 582dc24d37..eac3a04904 100644 --- a/go.sum +++ b/go.sum @@ -1097,8 +1097,8 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o= -google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= +google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 94aa00b371a3bc3b900667bf04e2942a53ff8c17 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Sep 2023 21:01:10 -0500 Subject: [PATCH 125/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.39 to 1.18.41 (#3047) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.39 to 1.18.41. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.39...config/v1.18.41) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 0790b439cd..4e25eb3a57 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.39 + github.com/aws/aws-sdk-go-v2/config v1.18.41 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,15 +82,15 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.37 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.39 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect diff --git a/go.sum b/go.sum index eac3a04904..c3060a94b6 100644 --- a/go.sum +++ b/go.sum @@ -105,10 +105,10 @@ github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WN github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.39 h1:oPVyh6fuu/u4OiW4qcuQyEtk7U7uuNBmHmJSLg1AJsQ= -github.com/aws/aws-sdk-go-v2/config v1.18.39/go.mod h1:+NH/ZigdPckFpgB1TRcRuWCB/Kbbvkxc/iNAKTq5RhE= -github.com/aws/aws-sdk-go-v2/credentials v1.13.37 h1:BvEdm09+ZEh2XtN+PVHPcYwKY3wIeB6pw7vPRM4M9/U= -github.com/aws/aws-sdk-go-v2/credentials v1.13.37/go.mod h1:ACLrdkd4CLZyXOghZ8IYumQbcooAcp2jo/s2xsFH8IM= +github.com/aws/aws-sdk-go-v2/config v1.18.41 h1:Go7z97YDsBJVNAaL7pDPKB6LeHEsAkHmFe+CeK30fUQ= +github.com/aws/aws-sdk-go-v2/config v1.18.41/go.mod h1:+yR45+A0LIMKT8bWOKo90Hy9rSrovEmEKoPKLmmVec8= +github.com/aws/aws-sdk-go-v2/credentials v1.13.39 h1:UnwBXDIHKDaejSXaRzKR57IdGCizk+z1DEhnsFpus7Q= +github.com/aws/aws-sdk-go-v2/credentials v1.13.39/go.mod h1:OJ9P239A90TnglJEF3qofKiNeEM6PCV/m+aNGV5WC24= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= @@ -123,12 +123,12 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeo github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 h1:2PylFCfKCEDv6PeSN09pC/VUiRd10wi1VfHG5FrW0/g= -github.com/aws/aws-sdk-go-v2/service/sso v1.13.6/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 h1:pSB560BbVj9ZlJZF4WYj5zsytWHWKxg+NgyGV4B2L58= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= -github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 h1:CQBFElb0LS8RojMJlxRSo/HXipvTZW2S44Lt9Mk2aYQ= -github.com/aws/aws-sdk-go-v2/service/sts v1.21.5/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 h1:AR/hlTsCyk1CwlyKnPFvIMvnONydRjDDRT9OGb0i+/g= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 h1:UniOmlPJelksyP5dGjfRoFTmLDy4/o0HH1lK2Op7zC8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk= +github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= From a83cbac55e9267f952a6a4d10e684c0bdc12898f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Sep 2023 21:05:26 -0500 Subject: [PATCH 126/187] chore(deps): bump docker/setup-qemu-action from 2.2.0 to 3.0.0 (#3031) Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2.2.0 to 3.0.0. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/2b82ce82d56a2a04d2637cd93a637ae1b359c0a7...68827325e0b33c7199eb31dd4e31fbe9023e06e3) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/image-reuse.yaml | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index 6c98cb9bfc..eefb23923d 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -78,7 +78,7 @@ jobs: with: cosign-release: 'v2.0.2' - - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 + - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Setup tags for container image as a CSV type diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 918958b729..df9479da3f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -96,7 +96,7 @@ jobs: go-version: ${{ env.GOLANG_VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 + uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 From 5af7ba9ad33ab7b96268afccf90158489f65974e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Sep 2023 21:05:51 -0500 Subject: [PATCH 127/187] chore(deps): bump github.com/antonmedv/expr from 1.15.2 to 1.15.3 (#3046) Bumps [github.com/antonmedv/expr](https://github.com/antonmedv/expr) from 1.15.2 to 1.15.3. - [Release notes](https://github.com/antonmedv/expr/releases) - [Commits](https://github.com/antonmedv/expr/compare/v1.15.2...v1.15.3) --- updated-dependencies: - dependency-name: github.com/antonmedv/expr dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4e25eb3a57..7a6438616a 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/argoproj/argo-rollouts go 1.20 require ( - github.com/antonmedv/expr v1.15.2 + github.com/antonmedv/expr v1.15.3 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 diff --git a/go.sum b/go.sum index c3060a94b6..e5db982007 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.2 h1:afFXpDWIC2n3bF+kTZE1JvFo+c34uaM3sTqh8z0xfdU= -github.com/antonmedv/expr v1.15.2/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= +github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= +github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= From bcee595c176d0ceffdee233ca28c675df7078701 Mon Sep 17 00:00:00 2001 From: "Kostis (Codefresh)" <39800303+kostis-codefresh@users.noreply.github.com> Date: Mon, 25 Sep 2023 15:47:24 +0300 Subject: [PATCH 128/187] docs: clarify external clusters (#3058) Signed-off-by: Kostis (Codefresh) <39800303+kostis-codefresh@users.noreply.github.com> Signed-off-by: Philip Clark --- docs/FAQ.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/FAQ.md b/docs/FAQ.md index 8a0c921cc7..861e4b3a80 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -41,6 +41,10 @@ solution that does not follow the GitOps approach. Yes. A k8s cluster can run multiple replicas of Argo-rollouts controllers to achieve HA. To enable this feature, run the controller with `--leader-elect` flag and increase the number of replicas in the controller's deployment manifest. The implementation is based on the [k8s client-go's leaderelection package](https://pkg.go.dev/k8s.io/client-go/tools/leaderelection#section-documentation). This implementation is tolerant to *arbitrary clock skew* among replicas. The level of tolerance to skew rate can be configured by setting `--leader-election-lease-duration` and `--leader-election-renew-deadline` appropriately. Please refer to the [package documentation](https://pkg.go.dev/k8s.io/client-go/tools/leaderelection#pkg-overview) for details. +### Can we install Argo Rollouts centrally in a cluster and manage Rollout resources in external clusters? + +No you cannot do that (even though Argo CD can work that way). This is by design because the Rollout is a custom resource unknown to vanilla Kubernetes. You need the Rollout CRD as well as the controller in the deployment cluster (every cluster that will use workloads with Rollouts). + ## Rollouts ### Which deployment strategies does Argo Rollouts support? From 54654cb8fb3301467f1239319626fe9c619f1e69 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 07:42:45 -0500 Subject: [PATCH 129/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.41 to 1.18.42 (#3055) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.41 to 1.18.42. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.41...config/v1.18.42) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 7a6438616a..6fcf264f9c 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.41 + github.com/aws/aws-sdk-go-v2/config v1.18.42 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,14 +82,14 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.39 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.40 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect diff --git a/go.sum b/go.sum index e5db982007..f0a32df12b 100644 --- a/go.sum +++ b/go.sum @@ -105,28 +105,28 @@ github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WN github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.41 h1:Go7z97YDsBJVNAaL7pDPKB6LeHEsAkHmFe+CeK30fUQ= -github.com/aws/aws-sdk-go-v2/config v1.18.41/go.mod h1:+yR45+A0LIMKT8bWOKo90Hy9rSrovEmEKoPKLmmVec8= -github.com/aws/aws-sdk-go-v2/credentials v1.13.39 h1:UnwBXDIHKDaejSXaRzKR57IdGCizk+z1DEhnsFpus7Q= -github.com/aws/aws-sdk-go-v2/credentials v1.13.39/go.mod h1:OJ9P239A90TnglJEF3qofKiNeEM6PCV/m+aNGV5WC24= +github.com/aws/aws-sdk-go-v2/config v1.18.42 h1:28jHROB27xZwU0CB88giDSjz7M1Sba3olb5JBGwina8= +github.com/aws/aws-sdk-go-v2/config v1.18.42/go.mod h1:4AZM3nMMxwlG+eZlxvBKqwVbkDLlnN2a4UGTL6HjaZI= +github.com/aws/aws-sdk-go-v2/credentials v1.13.40 h1:s8yOkDh+5b1jUDhMBtngF6zKWLDs84chUk2Vk0c38Og= +github.com/aws/aws-sdk-go-v2/credentials v1.13.40/go.mod h1:VtEHVAAqDWASwdOqj/1huyT6uHbs5s8FUHfDQdky/Rs= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 h1:SijA0mgjV8E+8G45ltVHs0fvKpTj8xmZJ3VwhGKtUSI= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 h1:GPUcE/Yq7Ur8YSUk6lVkoIMWnJNO0HT18GUzCWCgCI0= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 h1:qULF+ElcvjjSEO1+z5x+TmKE9d4yTej7PfpJQPVvexY= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7/go.mod h1:1HKxVrj5wsKy/wb2v07vzTSd+YPV1sDsWxferwPK7PA= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 h1:AR/hlTsCyk1CwlyKnPFvIMvnONydRjDDRT9OGb0i+/g= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 h1:UniOmlPJelksyP5dGjfRoFTmLDy4/o0HH1lK2Op7zC8= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 h1:YkNzx1RLS0F5qdf9v1Q8Cuv9NXCL2TkosOxhzlUPV64= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.1/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk= github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= From 22e912efe7bc465dfd7881639b8d53a141a83116 Mon Sep 17 00:00:00 2001 From: Jesse Suen Date: Fri, 29 Sep 2023 15:01:46 -0700 Subject: [PATCH 130/187] fix: prevent hot loop when fully promoted rollout is aborted (#3064) * fix: prevent hot loop when fully promoted rollout is aborted Signed-off-by: Jesse Suen * test: change expectations of abort tests Signed-off-by: Jesse Suen --------- Signed-off-by: Jesse Suen Signed-off-by: Philip Clark --- experiments/controller_test.go | 6 ++-- experiments/experiment_test.go | 2 +- experiments/replicaset_test.go | 4 +-- rollout/analysis_test.go | 64 +++++++++++++++++----------------- rollout/bluegreen_test.go | 16 ++++----- rollout/canary_test.go | 51 +++++++++++++-------------- rollout/controller.go | 5 +++ rollout/controller_test.go | 4 +-- rollout/experiment_test.go | 14 ++++---- rollout/service_test.go | 4 +-- test/e2e/istio_test.go | 4 +-- 11 files changed, 89 insertions(+), 85 deletions(-) diff --git a/experiments/controller_test.go b/experiments/controller_test.go index 26587b6346..0103e03ce1 100644 --- a/experiments/controller_test.go +++ b/experiments/controller_test.go @@ -805,7 +805,7 @@ func TestAddInvalidSpec(t *testing.T) { "status":{ } }`, nil, cond) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } func TestKeepInvalidSpec(t *testing.T) { @@ -852,7 +852,7 @@ func TestUpdateInvalidSpec(t *testing.T) { "status":{ } }`, nil, cond) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } @@ -892,7 +892,7 @@ func TestRemoveInvalidSpec(t *testing.T) { "status":{ } }`, templateStatus, cond) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } func TestRun(t *testing.T) { diff --git a/experiments/experiment_test.go b/experiments/experiment_test.go index e047082cee..21fbeb530a 100644 --- a/experiments/experiment_test.go +++ b/experiments/experiment_test.go @@ -282,7 +282,7 @@ func TestSuccessAfterDurationPasses(t *testing.T) { "phase": "Successful" } }`, templateStatuses, cond) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } // TestDontRequeueWithoutDuration verifies we don't requeue if an experiment does not have diff --git a/experiments/replicaset_test.go b/experiments/replicaset_test.go index e4d1cdf231..030414f2df 100644 --- a/experiments/replicaset_test.go +++ b/experiments/replicaset_test.go @@ -42,7 +42,7 @@ func TestCreateMultipleRS(t *testing.T) { "status":{ } }`, templateStatus, cond) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } func TestCreateMissingRS(t *testing.T) { @@ -72,7 +72,7 @@ func TestCreateMissingRS(t *testing.T) { generateTemplatesStatus("bar", 0, 0, v1alpha1.TemplateStatusProgressing, now()), generateTemplatesStatus("baz", 0, 0, v1alpha1.TemplateStatusProgressing, now()), } - assert.Equal(t, calculatePatch(e, expectedPatch, templateStatuses, cond), patch) + assert.JSONEq(t, calculatePatch(e, expectedPatch, templateStatuses, cond), patch) } func TestTemplateHasMultipleRS(t *testing.T) { diff --git a/rollout/analysis_test.go b/rollout/analysis_test.go index f0313d7ea0..de9a5e1db3 100644 --- a/rollout/analysis_test.go +++ b/rollout/analysis_test.go @@ -180,7 +180,7 @@ func TestCreateBackgroundAnalysisRun(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) } func TestCreateBackgroundAnalysisRunWithTemplates(t *testing.T) { @@ -241,7 +241,7 @@ func TestCreateBackgroundAnalysisRunWithTemplates(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) } func TestCreateBackgroundAnalysisRunWithClusterTemplates(t *testing.T) { @@ -303,7 +303,7 @@ func TestCreateBackgroundAnalysisRunWithClusterTemplates(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) } func TestInvalidSpecMissingClusterTemplatesBackgroundAnalysis(t *testing.T) { @@ -339,7 +339,7 @@ func TestInvalidSpecMissingClusterTemplatesBackgroundAnalysis(t *testing.T) { expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, progressingCond, string(invalidSpecBytes), strings.ReplaceAll(errmsg, "\"", "\\\"")) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } func TestCreateBackgroundAnalysisRunWithClusterTemplatesAndTemplate(t *testing.T) { @@ -416,7 +416,7 @@ func TestCreateBackgroundAnalysisRunWithClusterTemplatesAndTemplate(t *testing.T } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) } // TestCreateAnalysisRunWithCollision ensures we will create an new analysis run with a new name @@ -487,7 +487,7 @@ func TestCreateAnalysisRunWithCollision(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedAR.Name)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedAR.Name)), patch) } // TestCreateAnalysisRunWithCollisionAndSemanticEquality will ensure we do not create an extra @@ -550,7 +550,7 @@ func TestCreateAnalysisRunWithCollisionAndSemanticEquality(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ar.Name)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ar.Name)), patch) } func TestCreateAnalysisRunOnAnalysisStep(t *testing.T) { @@ -611,7 +611,7 @@ func TestCreateAnalysisRunOnAnalysisStep(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, expectedArName)), patch) } func TestFailCreateStepAnalysisRunIfInvalidTemplateRef(t *testing.T) { @@ -653,7 +653,7 @@ func TestFailCreateStepAnalysisRunIfInvalidTemplateRef(t *testing.T) { expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, progressingCond, string(invalidSpecBytes), strings.ReplaceAll(errmsg, "\"", "\\\"")) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } func TestFailCreateBackgroundAnalysisRunIfInvalidTemplateRef(t *testing.T) { @@ -698,7 +698,7 @@ func TestFailCreateBackgroundAnalysisRunIfInvalidTemplateRef(t *testing.T) { expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, progressingCond, string(invalidSpecBytes), strings.ReplaceAll(errmsg, "\"", "\\\"")) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } func TestFailCreateBackgroundAnalysisRunIfMetricRepeated(t *testing.T) { @@ -745,7 +745,7 @@ func TestFailCreateBackgroundAnalysisRunIfMetricRepeated(t *testing.T) { expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, progressingCond, string(invalidSpecBytes), strings.ReplaceAll(errmsg, "\"", "\\\"")) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } func TestDoNothingWithAnalysisRunsWhileBackgroundAnalysisRunRunning(t *testing.T) { @@ -798,7 +798,7 @@ func TestDoNothingWithAnalysisRunsWhileBackgroundAnalysisRunRunning(t *testing.T patchIndex := f.expectPatchRolloutAction(r2) f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestDoNothingWhileStepBasedAnalysisRunRunning(t *testing.T) { @@ -847,7 +847,7 @@ func TestDoNothingWhileStepBasedAnalysisRunRunning(t *testing.T) { patchIndex := f.expectPatchRolloutAction(r2) f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestCancelOlderAnalysisRuns(t *testing.T) { @@ -915,7 +915,7 @@ func TestCancelOlderAnalysisRuns(t *testing.T) { } } }` - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestDeleteAnalysisRunsWithNoMatchingRS(t *testing.T) { @@ -971,7 +971,7 @@ func TestDeleteAnalysisRunsWithNoMatchingRS(t *testing.T) { deletedAr := f.getDeletedAnalysisRun(deletedIndex) assert.Equal(t, deletedAr, arWithDiffPodHash.Name) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestDeleteAnalysisRunsAfterRSDelete(t *testing.T) { @@ -1083,7 +1083,7 @@ func TestIncrementStepAfterSuccessfulAnalysisRun(t *testing.T) { }` condition := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, rs2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition)), patch) } func TestPausedOnInconclusiveBackgroundAnalysisRun(t *testing.T) { @@ -1152,7 +1152,7 @@ func TestPausedOnInconclusiveBackgroundAnalysisRun(t *testing.T) { }` condition := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition, v1alpha1.PauseReasonInconclusiveAnalysis, now, v1alpha1.PauseReasonInconclusiveAnalysis)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition, v1alpha1.PauseReasonInconclusiveAnalysis, now, v1alpha1.PauseReasonInconclusiveAnalysis)), patch) } func TestPausedStepAfterInconclusiveAnalysisRun(t *testing.T) { @@ -1215,7 +1215,7 @@ func TestPausedStepAfterInconclusiveAnalysisRun(t *testing.T) { } }` condition := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition, v1alpha1.PauseReasonInconclusiveAnalysis, now, v1alpha1.PauseReasonInconclusiveAnalysis)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition, v1alpha1.PauseReasonInconclusiveAnalysis, now, v1alpha1.PauseReasonInconclusiveAnalysis)), patch) } func TestErrorConditionAfterErrorAnalysisRunStep(t *testing.T) { @@ -1282,7 +1282,7 @@ func TestErrorConditionAfterErrorAnalysisRunStep(t *testing.T) { errmsg := fmt.Sprintf(conditions.RolloutAbortedMessage, 2) + ": " + ar.Status.Message condition := generateConditionsPatch(true, conditions.RolloutAbortedReason, r2, false, errmsg, false) expectedPatch = fmt.Sprintf(expectedPatch, condition, now, errmsg) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestErrorConditionAfterErrorAnalysisRunBackground(t *testing.T) { @@ -1358,7 +1358,7 @@ func TestErrorConditionAfterErrorAnalysisRunBackground(t *testing.T) { condition := generateConditionsPatch(true, conditions.RolloutAbortedReason, r2, false, "", false) now := timeutil.Now().UTC().Format(time.RFC3339) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition, now, errmsg)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, condition, now, errmsg)), patch) } func TestCancelAnalysisRunsWhenAborted(t *testing.T) { @@ -1419,7 +1419,7 @@ func TestCancelAnalysisRunsWhenAborted(t *testing.T) { }` errmsg := fmt.Sprintf(conditions.RolloutAbortedMessage, 2) now := timeutil.Now().UTC().Format(time.RFC3339) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, newConditions, now, errmsg)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, newConditions, now, errmsg)), patch) } func TestCancelBackgroundAnalysisRunWhenRolloutIsCompleted(t *testing.T) { @@ -1521,7 +1521,7 @@ func TestDoNotCreateBackgroundAnalysisRunAfterInconclusiveRun(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestDoNotCreateBackgroundAnalysisRunOnNewCanaryRollout(t *testing.T) { @@ -1647,7 +1647,7 @@ func TestCreatePrePromotionAnalysisRun(t *testing.T) { } } }`, ar.Name) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } // TestDoNotCreatePrePromotionAnalysisProgressedRollout ensures a pre-promotion analysis is not created after a Rollout @@ -1771,7 +1771,7 @@ func TestDoNotCreatePrePromotionAnalysisRunOnNotReadyReplicaSet(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchRolloutIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestRolloutPrePromotionAnalysisBecomesInconclusive(t *testing.T) { @@ -1841,7 +1841,7 @@ func TestRolloutPrePromotionAnalysisBecomesInconclusive(t *testing.T) { } } }`, now, now) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestRolloutPrePromotionAnalysisSwitchServiceAfterSuccess(t *testing.T) { @@ -1905,7 +1905,7 @@ func TestRolloutPrePromotionAnalysisSwitchServiceAfterSuccess(t *testing.T) { "message": null } }`, rs2PodHash, rs2PodHash, rs2PodHash) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestRolloutPrePromotionAnalysisHonorAutoPromotionSeconds(t *testing.T) { @@ -1971,7 +1971,7 @@ func TestRolloutPrePromotionAnalysisHonorAutoPromotionSeconds(t *testing.T) { "message": null } }`, rs2PodHash, rs2PodHash, rs2PodHash) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestRolloutPrePromotionAnalysisDoNothingOnInconclusiveAnalysis(t *testing.T) { @@ -2096,7 +2096,7 @@ func TestAbortRolloutOnErrorPrePromotionAnalysis(t *testing.T) { now := timeutil.MetaNow().UTC().Format(time.RFC3339) progressingFalseAborted, _ := newProgressingCondition(conditions.RolloutAbortedReason, r2, "") newConditions := updateConditionsPatch(*r2, progressingFalseAborted) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, now, newConditions, conditions.RolloutAbortedReason, progressingFalseAborted.Message)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, now, newConditions, conditions.RolloutAbortedReason, progressingFalseAborted.Message)), patch) } func TestCreatePostPromotionAnalysisRun(t *testing.T) { @@ -2143,7 +2143,7 @@ func TestCreatePostPromotionAnalysisRun(t *testing.T) { } } }`, ar.Name) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestRolloutPostPromotionAnalysisSuccess(t *testing.T) { @@ -2199,7 +2199,7 @@ func TestRolloutPostPromotionAnalysisSuccess(t *testing.T) { "message": null } }`, rs2PodHash) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } // TestPostPromotionAnalysisRunHandleInconclusive ensures that the Rollout does not scale down a old ReplicaSet if @@ -2264,7 +2264,7 @@ func TestPostPromotionAnalysisRunHandleInconclusive(t *testing.T) { "message": "InconclusiveAnalysisRun" } }`) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestAbortRolloutOnErrorPostPromotionAnalysis(t *testing.T) { @@ -2334,7 +2334,7 @@ func TestAbortRolloutOnErrorPostPromotionAnalysis(t *testing.T) { now := timeutil.MetaNow().UTC().Format(time.RFC3339) progressingFalseAborted, _ := newProgressingCondition(conditions.RolloutAbortedReason, r2, "") newConditions := updateConditionsPatch(*r2, progressingFalseAborted) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, now, newConditions, conditions.RolloutAbortedReason, progressingFalseAborted.Message)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, now, newConditions, conditions.RolloutAbortedReason, progressingFalseAborted.Message)), patch) } func TestCreateAnalysisRunWithCustomAnalysisRunMetadataAndROCopyLabels(t *testing.T) { diff --git a/rollout/bluegreen_test.go b/rollout/bluegreen_test.go index 42b521a565..cff894e8ca 100644 --- a/rollout/bluegreen_test.go +++ b/rollout/bluegreen_test.go @@ -290,7 +290,7 @@ func TestBlueGreenHandlePause(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchRolloutIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) }) t.Run("AddPause", func(t *testing.T) { f := newFixture(t) @@ -334,7 +334,7 @@ func TestBlueGreenHandlePause(t *testing.T) { } }` now := timeutil.Now().UTC().Format(time.RFC3339) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, v1alpha1.PauseReasonBlueGreenPause, now)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, v1alpha1.PauseReasonBlueGreenPause, now)), patch) }) @@ -376,7 +376,7 @@ func TestBlueGreenHandlePause(t *testing.T) { } }` addedConditions := generateConditionsPatchWithPause(true, conditions.RolloutPausedReason, rs2, true, "", true, false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, addedConditions)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, addedConditions)), patch) }) t.Run("NoActionsAfterPausing", func(t *testing.T) { @@ -417,7 +417,7 @@ func TestBlueGreenHandlePause(t *testing.T) { patchIndex := f.expectPatchRolloutActionWithPatch(r2, OnlyObservedGenerationPatch) f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) }) t.Run("NoActionsAfterPausedOnInconclusiveRun", func(t *testing.T) { @@ -468,7 +468,7 @@ func TestBlueGreenHandlePause(t *testing.T) { patchIndex := f.expectPatchRolloutActionWithPatch(r2, OnlyObservedGenerationPatch) f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) }) t.Run("NoAutoPromoteBeforeDelayTimePasses", func(t *testing.T) { @@ -509,7 +509,7 @@ func TestBlueGreenHandlePause(t *testing.T) { patchIndex := f.expectPatchRolloutActionWithPatch(r2, OnlyObservedGenerationPatch) f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) }) t.Run("AutoPromoteAfterDelayTimePasses", func(t *testing.T) { @@ -813,7 +813,7 @@ func TestBlueGreenHandlePause(t *testing.T) { "conditions": %s } }` - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedUnpausePatch, unpauseConditions)), unpausePatch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedUnpausePatch, unpauseConditions)), unpausePatch) generatedConditions := generateConditionsPatchWithCompleted(true, conditions.ReplicaSetUpdatedReason, rs2, true, "", true) expected2ndPatchWithoutSubs := `{ @@ -1453,7 +1453,7 @@ func TestBlueGreenAbort(t *testing.T) { } }`, rs1PodHash, expectedConditions, rs1PodHash, conditions.RolloutAbortedReason, fmt.Sprintf(conditions.RolloutAbortedMessage, 2)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestBlueGreenHandlePauseAutoPromoteWithConditions(t *testing.T) { diff --git a/rollout/canary_test.go b/rollout/canary_test.go index e3bffff2dd..4adca3fcb9 100644 --- a/rollout/canary_test.go +++ b/rollout/canary_test.go @@ -182,7 +182,7 @@ func TestCanaryRolloutEnterPauseState(t *testing.T) { now := timeutil.MetaNow().UTC().Format(time.RFC3339) expectedPatchWithoutObservedGen := fmt.Sprintf(expectedPatchTemplate, v1alpha1.PauseReasonCanaryPauseStep, now, conditions, v1alpha1.PauseReasonCanaryPauseStep) expectedPatch := calculatePatch(r2, expectedPatchWithoutObservedGen) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } func TestCanaryRolloutNoProgressWhilePaused(t *testing.T) { @@ -257,7 +257,7 @@ func TestCanaryRolloutUpdatePauseConditionWhilePaused(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRollout(addPausedConditionPatch) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestCanaryRolloutResetProgressDeadlineOnRetry(t *testing.T) { @@ -300,7 +300,7 @@ func TestCanaryRolloutResetProgressDeadlineOnRetry(t *testing.T) { "message": "more replicas need to be updated" } }`, retryCondition) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestCanaryRolloutIncrementStepAfterUnPaused(t *testing.T) { @@ -342,7 +342,7 @@ func TestCanaryRolloutIncrementStepAfterUnPaused(t *testing.T) { }` generatedConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, rs2, false, "", false) expectedPatch := calculatePatch(r2, fmt.Sprintf(expectedPatchTemplate, generatedConditions)) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } func TestCanaryRolloutUpdateStatusWhenAtEndOfSteps(t *testing.T) { @@ -383,7 +383,7 @@ func TestCanaryRolloutUpdateStatusWhenAtEndOfSteps(t *testing.T) { }` expectedPatch := fmt.Sprintf(expectedPatchWithoutStableRS, expectedStableRS, generateConditionsPatchWithCompleted(true, conditions.ReplicaSetUpdatedReason, rs2, false, "", true)) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestResetCurrentStepIndexOnStepChange(t *testing.T) { @@ -426,7 +426,7 @@ func TestResetCurrentStepIndexOnStepChange(t *testing.T) { }` newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) expectedPatch := fmt.Sprintf(expectedPatchWithoutPodHash, expectedCurrentPodHash, expectedCurrentStepHash, newConditions) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestResetCurrentStepIndexOnPodSpecChange(t *testing.T) { @@ -467,7 +467,7 @@ func TestResetCurrentStepIndexOnPodSpecChange(t *testing.T) { newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) expectedPatch := fmt.Sprintf(expectedPatchWithoutPodHash, expectedCurrentPodHash, newConditions) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestCanaryRolloutCreateFirstReplicasetNoSteps(t *testing.T) { @@ -505,7 +505,7 @@ func TestCanaryRolloutCreateFirstReplicasetNoSteps(t *testing.T) { newConditions := generateConditionsPatchWithCompleted(false, conditions.ReplicaSetUpdatedReason, rs, false, "", true) - assert.Equal(t, calculatePatch(r, fmt.Sprintf(expectedPatch, newConditions)), patch) + assert.JSONEq(t, calculatePatch(r, fmt.Sprintf(expectedPatch, newConditions)), patch) } func TestCanaryRolloutCreateFirstReplicasetWithSteps(t *testing.T) { @@ -545,7 +545,7 @@ func TestCanaryRolloutCreateFirstReplicasetWithSteps(t *testing.T) { }` expectedPatch := fmt.Sprintf(expectedPatchWithSub, generateConditionsPatchWithCompleted(false, conditions.ReplicaSetUpdatedReason, rs, false, "", true)) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } func TestCanaryRolloutCreateNewReplicaWithCorrectWeight(t *testing.T) { @@ -843,7 +843,7 @@ func TestRollBackToStable(t *testing.T) { newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, rs1, false, "", true) expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, hash.ComputePodTemplateHash(&r2.Spec.Template, r2.Status.CollisionCount), newConditions) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestRollBackToActiveReplicaSetWithinWindow(t *testing.T) { @@ -935,7 +935,7 @@ func TestGradualShiftToNewStable(t *testing.T) { newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, newConditions) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestRollBackToStableAndStepChange(t *testing.T) { @@ -983,7 +983,7 @@ func TestRollBackToStableAndStepChange(t *testing.T) { newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, rs1, false, "", true) expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, newPodHash, newStepHash, newConditions) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestCanaryRolloutIncrementStepIfSetWeightsAreCorrect(t *testing.T) { @@ -1019,7 +1019,7 @@ func TestCanaryRolloutIncrementStepIfSetWeightsAreCorrect(t *testing.T) { } }` newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, rs3, false, "", false) - assert.Equal(t, calculatePatch(r3, fmt.Sprintf(expectedPatch, newConditions)), patch) + assert.JSONEq(t, calculatePatch(r3, fmt.Sprintf(expectedPatch, newConditions)), patch) } func TestSyncRolloutWaitAddToQueue(t *testing.T) { @@ -1171,7 +1171,7 @@ func TestSyncRolloutWaitIncrementStepIndex(t *testing.T) { "currentStepIndex":2 } }` - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestCanaryRolloutStatusHPAStatusFields(t *testing.T) { @@ -1215,7 +1215,7 @@ func TestCanaryRolloutStatusHPAStatusFields(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRolloutWithoutConditions(index) - assert.Equal(t, calculatePatch(r2, expectedPatchWithSub), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatchWithSub), patch) } func TestCanaryRolloutWithCanaryService(t *testing.T) { @@ -1656,7 +1656,7 @@ func TestCanaryRolloutScaleWhilePaused(t *testing.T) { patch := f.getPatchedRolloutWithoutConditions(patchIndex) expectedPatch := calculatePatch(r2, OnlyObservedGenerationPatch) - assert.Equal(t, expectedPatch, patch) + assert.JSONEq(t, expectedPatch, patch) } func TestResumeRolloutAfterPauseDuration(t *testing.T) { @@ -1756,7 +1756,7 @@ func TestNoResumeAfterPauseDurationIfUserPaused(t *testing.T) { "message": "manually paused" } }` - assert.Equal(t, calculatePatch(r2, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r2, expectedPatch), patch) } func TestHandleNilNewRSOnScaleAndImageChange(t *testing.T) { @@ -1803,7 +1803,7 @@ func TestHandleNilNewRSOnScaleAndImageChange(t *testing.T) { patchIndex := f.expectPatchRolloutAction(r2) f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } func TestHandleCanaryAbort(t *testing.T) { @@ -1850,10 +1850,10 @@ func TestHandleCanaryAbort(t *testing.T) { }` errmsg := fmt.Sprintf(conditions.RolloutAbortedMessage, 2) newConditions := generateConditionsPatch(true, conditions.RolloutAbortedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, newConditions, conditions.RolloutAbortedReason, errmsg)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, newConditions, conditions.RolloutAbortedReason, errmsg)), patch) }) - t.Run("Do not reset currentStepCount if newRS is stableRS", func(t *testing.T) { + t.Run("Do not reset currentStepCount and reset abort if newRS is stableRS", func(t *testing.T) { f := newFixture(t) defer f.Close() @@ -1881,13 +1881,12 @@ func TestHandleCanaryAbort(t *testing.T) { patch := f.getPatchedRollout(patchIndex) expectedPatch := `{ "status":{ - "conditions": %s, - "phase": "Degraded", - "message": "%s: %s" + "abort": null, + "abortedAt": null, + "conditions": %s } }` - errmsg := fmt.Sprintf(conditions.RolloutAbortedMessage, 1) - newConditions := generateConditionsPatch(true, conditions.RolloutAbortedReason, r1, false, "", true) - assert.Equal(t, calculatePatch(r1, fmt.Sprintf(expectedPatch, newConditions, conditions.RolloutAbortedReason, errmsg)), patch) + newConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r1, false, "", true) + assert.JSONEq(t, calculatePatch(r1, fmt.Sprintf(expectedPatch, newConditions)), patch) }) } diff --git a/rollout/controller.go b/rollout/controller.go index 5824512271..ebc17c1303 100644 --- a/rollout/controller.go +++ b/rollout/controller.go @@ -56,6 +56,7 @@ import ( logutil "github.com/argoproj/argo-rollouts/utils/log" "github.com/argoproj/argo-rollouts/utils/record" replicasetutil "github.com/argoproj/argo-rollouts/utils/replicaset" + rolloututil "github.com/argoproj/argo-rollouts/utils/rollout" serviceutil "github.com/argoproj/argo-rollouts/utils/service" timeutil "github.com/argoproj/argo-rollouts/utils/time" unstructuredutil "github.com/argoproj/argo-rollouts/utils/unstructured" @@ -520,6 +521,10 @@ func (c *Controller) newRolloutContext(rollout *v1alpha1.Rollout) (*rolloutConte }, reconcilerBase: c.reconcilerBase, } + if rolloututil.IsFullyPromoted(rollout) && roCtx.pauseContext.IsAborted() { + logCtx.Warnf("Removing abort condition from fully promoted rollout") + roCtx.pauseContext.RemoveAbort() + } // carry over existing recorded weights roCtx.newStatus.Canary.Weights = rollout.Status.Canary.Weights return &roCtx, nil diff --git a/rollout/controller_test.go b/rollout/controller_test.go index d37cdc24cd..a637d68f29 100644 --- a/rollout/controller_test.go +++ b/rollout/controller_test.go @@ -1346,7 +1346,7 @@ func TestSwitchInvalidSpecMessage(t *testing.T) { expectedPatch := fmt.Sprintf(expectedPatchWithoutSub, progressingCond, string(invalidSpecBytes), conditions.InvalidSpecReason, strings.ReplaceAll(errmsg, "\"", "\\\"")) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } // TestPodTemplateHashEquivalence verifies the hash is computed consistently when there are slight @@ -1549,7 +1549,7 @@ func TestSwitchBlueGreenToCanary(t *testing.T) { "selector": "foo=bar" } }`, addedConditions, conditions.ComputeStepHash(r)) - assert.Equal(t, calculatePatch(r, expectedPatch), patch) + assert.JSONEq(t, calculatePatch(r, expectedPatch), patch) } func newInvalidSpecCondition(reason string, resourceObj runtime.Object, optionalMessage string) (v1alpha1.RolloutCondition, string) { diff --git a/rollout/experiment_test.go b/rollout/experiment_test.go index bcd10cad92..233dd16ca5 100644 --- a/rollout/experiment_test.go +++ b/rollout/experiment_test.go @@ -69,7 +69,7 @@ func TestRolloutCreateExperiment(t *testing.T) { } }` conds := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ex.Name, conds)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ex.Name, conds)), patch) } func TestRolloutCreateClusterTemplateExperiment(t *testing.T) { @@ -126,7 +126,7 @@ func TestRolloutCreateClusterTemplateExperiment(t *testing.T) { } }` conds := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ex.Name, conds)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ex.Name, conds)), patch) } func TestCreateExperimentWithCollision(t *testing.T) { @@ -178,7 +178,7 @@ func TestCreateExperimentWithCollision(t *testing.T) { } }` conds := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, createdEx.Name, conds)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, createdEx.Name, conds)), patch) } func TestCreateExperimentWithCollisionAndSemanticEquality(t *testing.T) { @@ -229,7 +229,7 @@ func TestCreateExperimentWithCollisionAndSemanticEquality(t *testing.T) { } }` conds := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ex.Name, conds)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, ex.Name, conds)), patch) } func TestRolloutExperimentProcessingDoNothing(t *testing.T) { @@ -267,7 +267,7 @@ func TestRolloutExperimentProcessingDoNothing(t *testing.T) { f.run(getKey(r2, t)) patch := f.getPatchedRollout(patchIndex) - assert.Equal(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) + assert.JSONEq(t, calculatePatch(r2, OnlyObservedGenerationPatch), patch) } @@ -314,7 +314,7 @@ func TestAbortRolloutAfterFailedExperiment(t *testing.T) { }` now := timeutil.Now().UTC().Format(time.RFC3339) generatedConditions := generateConditionsPatch(true, conditions.RolloutAbortedReason, r2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, now, generatedConditions, conditions.RolloutAbortedReason, fmt.Sprintf(conditions.RolloutAbortedMessage, 2))), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, now, generatedConditions, conditions.RolloutAbortedReason, fmt.Sprintf(conditions.RolloutAbortedMessage, 2))), patch) } func TestPauseRolloutAfterInconclusiveExperiment(t *testing.T) { @@ -481,7 +481,7 @@ func TestRolloutExperimentFinishedIncrementStep(t *testing.T) { }` generatedConditions := generateConditionsPatch(true, conditions.ReplicaSetUpdatedReason, rs2, false, "", false) - assert.Equal(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, generatedConditions)), patch) + assert.JSONEq(t, calculatePatch(r2, fmt.Sprintf(expectedPatch, generatedConditions)), patch) } func TestRolloutDoNotCreateExperimentWithoutStableRS(t *testing.T) { diff --git a/rollout/service_test.go b/rollout/service_test.go index 393faf87a0..e29ee53b4a 100644 --- a/rollout/service_test.go +++ b/rollout/service_test.go @@ -144,7 +144,7 @@ func TestActiveServiceNotFound(t *testing.T) { } }` _, pausedCondition := newInvalidSpecCondition(conditions.InvalidSpecReason, notUsedActiveSvc, errmsg) - assert.Equal(t, calculatePatch(r, fmt.Sprintf(expectedPatch, pausedCondition, conditions.InvalidSpecReason, strings.ReplaceAll(errmsg, "\"", "\\\""))), patch) + assert.JSONEq(t, calculatePatch(r, fmt.Sprintf(expectedPatch, pausedCondition, conditions.InvalidSpecReason, strings.ReplaceAll(errmsg, "\"", "\\\""))), patch) } func TestPreviewServiceNotFound(t *testing.T) { @@ -173,7 +173,7 @@ func TestPreviewServiceNotFound(t *testing.T) { } }` _, pausedCondition := newInvalidSpecCondition(conditions.InvalidSpecReason, notUsedPreviewSvc, errmsg) - assert.Equal(t, calculatePatch(r, fmt.Sprintf(expectedPatch, pausedCondition, conditions.InvalidSpecReason, strings.ReplaceAll(errmsg, "\"", "\\\""))), patch) + assert.JSONEq(t, calculatePatch(r, fmt.Sprintf(expectedPatch, pausedCondition, conditions.InvalidSpecReason, strings.ReplaceAll(errmsg, "\"", "\\\""))), patch) } diff --git a/test/e2e/istio_test.go b/test/e2e/istio_test.go index 2f993f09bc..7ecbd66fdf 100644 --- a/test/e2e/istio_test.go +++ b/test/e2e/istio_test.go @@ -303,7 +303,7 @@ func (s *IstioSuite) TestIstioAbortUpdate() { Then(). When(). AbortRollout(). - WaitForRolloutStatus("Degraded"). + WaitForRolloutStatus("Healthy"). Then(). ExpectRevisionPodCount("1", 1). When(). @@ -316,7 +316,7 @@ func (s *IstioSuite) TestIstioAbortUpdate() { Then(). When(). AbortRollout(). - WaitForRolloutStatus("Degraded"). + WaitForRolloutStatus("Healthy"). Then(). ExpectRevisionPodCount("2", 1) } From 86adb055a3486ce797066f5d1ec776fea85ebdc2 Mon Sep 17 00:00:00 2001 From: Zubair Haque Date: Mon, 2 Oct 2023 16:37:30 -0500 Subject: [PATCH 131/187] chore: updating getCanaryConfigId to be more efficient with better error handling (#3070) updating getCanaryConfigId to be more efficient with better error handling Signed-off-by: zhaque44 Signed-off-by: Philip Clark --- metricproviders/kayenta/kayenta.go | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/metricproviders/kayenta/kayenta.go b/metricproviders/kayenta/kayenta.go index 79f47c5f28..b623aa7730 100644 --- a/metricproviders/kayenta/kayenta.go +++ b/metricproviders/kayenta/kayenta.go @@ -67,26 +67,20 @@ func (p *Provider) GetMetadata(metric v1alpha1.Metric) map[string]string { } func getCanaryConfigId(metric v1alpha1.Metric, p *Provider) (string, error) { - configIdLookupURL := fmt.Sprintf(configIdLookupURLFormat, metric.Provider.Kayenta.Address, metric.Provider.Kayenta.Application, metric.Provider.Kayenta.StorageAccountName) response, err := p.client.Get(configIdLookupURL) - if err != nil || response.Body == nil || response.StatusCode != 200 { - if err == nil { - err = errors.New("Invalid Response") - } + if err != nil { return "", err } + defer response.Body.Close() - data, err := io.ReadAll(response.Body) - if err != nil { - return "", err + if response.StatusCode != 200 { + return "", fmt.Errorf("Invalid Response: HTTP %d", response.StatusCode) } var cc []canaryConfig - - err = json.Unmarshal(data, &cc) - if err != nil { + if err := json.NewDecoder(response.Body).Decode(&cc); err != nil { return "", err } @@ -96,7 +90,7 @@ func getCanaryConfigId(metric v1alpha1.Metric, p *Provider) (string, error) { } } - return "", err + return "", errors.New("Canary config not found") } // Run queries kayentd for the metric From d5e21532bc09dae5faa3a1d47a3a5a872dea57ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:37:52 -0500 Subject: [PATCH 132/187] chore(deps): bump github.com/hashicorp/go-plugin from 1.5.1 to 1.5.2 (#3056) Bumps [github.com/hashicorp/go-plugin](https://github.com/hashicorp/go-plugin) from 1.5.1 to 1.5.2. - [Release notes](https://github.com/hashicorp/go-plugin/releases) - [Changelog](https://github.com/hashicorp/go-plugin/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/go-plugin/compare/v1.5.1...v1.5.2) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6fcf264f9c..25a4d14444 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.3 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/hashicorp/go-plugin v1.5.1 + github.com/hashicorp/go-plugin v1.5.2 github.com/influxdata/influxdb-client-go/v2 v2.12.3 github.com/juju/ansiterm v1.0.0 github.com/machinebox/graphql v0.2.2 diff --git a/go.sum b/go.sum index f0a32df12b..8b00f1d6f5 100644 --- a/go.sum +++ b/go.sum @@ -402,8 +402,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.14.1 h1:nQcJDQwIAGnmoUWp8ubocEX40cCml/17YkF6csQLReU= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-plugin v1.5.1 h1:oGm7cWBaYIp3lJpx1RUEfLWophprE2EV/KUeqBYo+6k= -github.com/hashicorp/go-plugin v1.5.1/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.1/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= From b1b28124cdc58633ae4dd6a08fea56d322c4116a Mon Sep 17 00:00:00 2001 From: Jesse Suen Date: Wed, 4 Oct 2023 06:14:01 -0700 Subject: [PATCH 133/187] fix: inopportune scaling events would lose some status fields (#3060) fix: inopportune scaling events would result in loss of data Signed-off-by: Jesse Suen Signed-off-by: Philip Clark --- rollout/sync.go | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/rollout/sync.go b/rollout/sync.go index 98990b4596..f13a3489c7 100644 --- a/rollout/sync.go +++ b/rollout/sync.go @@ -274,10 +274,11 @@ func (c *rolloutContext) syncReplicasOnly() error { if err != nil { return err } + newStatus := c.rollout.Status.DeepCopy() // NOTE: it is possible for newRS to be nil (e.g. when template and replicas changed at same time) if c.rollout.Spec.Strategy.BlueGreen != nil { - previewSvc, activeSvc, err := c.getPreviewAndActiveServices() + _, activeSvc, err := c.getPreviewAndActiveServices() if err != nil { return nil } @@ -286,7 +287,15 @@ func (c *rolloutContext) syncReplicasOnly() error { // so we can abort this resync return err } - return c.syncRolloutStatusBlueGreen(previewSvc, activeSvc) + activeRS, _ := replicasetutil.GetReplicaSetByTemplateHash(c.allRSs, newStatus.BlueGreen.ActiveSelector) + if activeRS != nil { + newStatus.HPAReplicas = activeRS.Status.Replicas + newStatus.AvailableReplicas = activeRS.Status.AvailableReplicas + } else { + // when we do not have an active replicaset, accounting is done on the default rollout selector + newStatus.HPAReplicas = replicasetutil.GetActualReplicaCountForReplicaSets(c.allRSs) + newStatus.AvailableReplicas = replicasetutil.GetAvailableReplicaCountForReplicaSets(c.allRSs) + } } // The controller wants to use the rolloutCanary method to reconcile the rollout if the rollout is not paused. // If there are no scaling events, the rollout should only sync its status @@ -296,9 +305,10 @@ func (c *rolloutContext) syncReplicasOnly() error { // so we can abort this resync return err } - return c.syncRolloutStatusCanary() + newStatus.AvailableReplicas = replicasetutil.GetAvailableReplicaCountForReplicaSets(c.allRSs) + newStatus.HPAReplicas = replicasetutil.GetActualReplicaCountForReplicaSets(c.allRSs) } - return fmt.Errorf("no rollout strategy provided") + return c.persistRolloutStatus(newStatus) } // isScalingEvent checks whether the provided rollout has been updated with a scaling event From 48fda35c3f9498f38368cd6bf013f9ae4a5a8c96 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 08:14:24 -0500 Subject: [PATCH 134/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.42 to 1.18.43 (#3072) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.42 to 1.18.43. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.42...config/v1.18.43) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 25a4d14444..8e9b03f62b 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.42 + github.com/aws/aws-sdk-go-v2/config v1.18.43 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,15 +82,15 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.40 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.41 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect diff --git a/go.sum b/go.sum index 8b00f1d6f5..764feeed8d 100644 --- a/go.sum +++ b/go.sum @@ -105,10 +105,10 @@ github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WN github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.42 h1:28jHROB27xZwU0CB88giDSjz7M1Sba3olb5JBGwina8= -github.com/aws/aws-sdk-go-v2/config v1.18.42/go.mod h1:4AZM3nMMxwlG+eZlxvBKqwVbkDLlnN2a4UGTL6HjaZI= -github.com/aws/aws-sdk-go-v2/credentials v1.13.40 h1:s8yOkDh+5b1jUDhMBtngF6zKWLDs84chUk2Vk0c38Og= -github.com/aws/aws-sdk-go-v2/credentials v1.13.40/go.mod h1:VtEHVAAqDWASwdOqj/1huyT6uHbs5s8FUHfDQdky/Rs= +github.com/aws/aws-sdk-go-v2/config v1.18.43 h1:IgdUtTRvUDC6eiJBqU6vh7bHFNAEBjQ8S+qJ7zVhDOs= +github.com/aws/aws-sdk-go-v2/config v1.18.43/go.mod h1:NiFev8qlgg8MPzw3fO/EwzMZeZwlJEKGwfpjRPA9Nvw= +github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9rmEzEhbZFh9JQW/Bg= +github.com/aws/aws-sdk-go-v2/credentials v1.13.41/go.mod h1:cc3Fn7DkKbJalPtQnudHGZZ8ml9+hwtbc1CJONsYYqk= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= @@ -123,12 +123,12 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeo github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 h1:YkNzx1RLS0F5qdf9v1Q8Cuv9NXCL2TkosOxhzlUPV64= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.1/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 h1:vuGK1vHNP9zx0PfOrtPumbwR2af0ATQ1Z2H6p75AgRQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= -github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk= -github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= From 52234c9f1f7d379769b6ecdb3ce74a05d5a44533 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Thu, 5 Oct 2023 08:14:05 -0600 Subject: [PATCH 135/187] fix: sync notification controller configmaps/secrets first (#3075) sync notification controller configmaps/secrets first before starting other informers Signed-off-by: zachaller Signed-off-by: Philip Clark --- controller/controller.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/controller/controller.go b/controller/controller.go index 5429cfe743..afe4bc769b 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -463,6 +463,12 @@ func (c *Manager) startLeading(ctx context.Context, rolloutThreadiness, serviceT // Start the informer factories to begin populating the informer caches log.Info("Starting Controllers") + c.notificationConfigMapInformerFactory.Start(ctx.Done()) + c.notificationSecretInformerFactory.Start(ctx.Done()) + if ok := cache.WaitForCacheSync(ctx.Done(), c.configMapSynced, c.secretSynced); !ok { + log.Fatalf("failed to wait for configmap/secret caches to sync, exiting") + } + // notice that there is no need to run Start methods in a separate goroutine. (i.e. go kubeInformerFactory.Start(stopCh) // Start method is non-blocking and runs all registered informers in a dedicated goroutine. c.dynamicInformerFactory.Start(ctx.Done()) @@ -471,9 +477,6 @@ func (c *Manager) startLeading(ctx context.Context, rolloutThreadiness, serviceT } c.kubeInformerFactory.Start(ctx.Done()) - c.notificationConfigMapInformerFactory.Start(ctx.Done()) - c.notificationSecretInformerFactory.Start(ctx.Done()) - c.jobInformerFactory.Start(ctx.Done()) // Check if Istio installed on cluster before starting dynamicInformerFactory From 5f0e16dfe1badf4031551a43fc26d9285ef1dc55 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Thu, 5 Oct 2023 10:30:50 -0600 Subject: [PATCH 136/187] fix: missing notification on error (#3076) * fix: missing notification on error Signed-off-by: zachaller * fix tests Signed-off-by: zachaller * aggregate errors Signed-off-by: zachaller * fix bad stat counts Signed-off-by: zachaller * return errors Signed-off-by: zachaller * fix tests on return of errors Signed-off-by: zachaller * change case on logs Signed-off-by: zachaller * missed a case Signed-off-by: zachaller --------- Signed-off-by: zachaller Signed-off-by: Philip Clark --- utils/record/record.go | 40 ++++++++++++++++++++++++------------- utils/record/record_test.go | 14 ++++++------- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/utils/record/record.go b/utils/record/record.go index d2bd322acf..859b954390 100644 --- a/utils/record/record.go +++ b/utils/record/record.go @@ -218,9 +218,7 @@ func (e *EventRecorderAdapter) defaultEventf(object runtime.Object, warn bool, o err := e.sendNotifications(api, object, opts) if err != nil { logCtx.Errorf("Notifications failed to send for eventReason %s with error: %s", opts.EventReason, err) - e.NotificationFailedCounter.WithLabelValues(namespace, name, opts.EventType, opts.EventReason).Inc() } - e.NotificationSuccessCounter.WithLabelValues(namespace, name, opts.EventType, opts.EventReason).Inc() } } @@ -248,7 +246,7 @@ func NewAPIFactorySettings() api.Settings { } // Send notifications for triggered event if user is subscribed -func (e *EventRecorderAdapter) sendNotifications(notificationsAPI api.API, object runtime.Object, opts EventOptions) error { +func (e *EventRecorderAdapter) sendNotifications(notificationsAPI api.API, object runtime.Object, opts EventOptions) []error { logCtx := logutil.WithObject(object) _, namespace, name := logutil.KindNamespaceName(logCtx) startTime := timeutil.Now() @@ -259,7 +257,7 @@ func (e *EventRecorderAdapter) sendNotifications(notificationsAPI api.API, objec }() if notificationsAPI == nil { - return fmt.Errorf("notificationsAPI is nil") + return []error{fmt.Errorf("NotificationsAPI is nil")} } cfg := notificationsAPI.GetConfig() @@ -274,39 +272,53 @@ func (e *EventRecorderAdapter) sendNotifications(notificationsAPI api.API, objec objMap, err := toObjectMap(object) if err != nil { - return err + return []error{err} } emptyCondition := hash("") + // We should not return in these loops because we want other configured notifications to still send if they can. + errors := []error{} for _, destination := range destinations { res, err := notificationsAPI.RunTrigger(trigger, objMap) if err != nil { - log.Errorf("Failed to execute condition of trigger %s: %v", trigger, err) - return err + log.Errorf("Failed to run trigger, trigger: %s, destination: %s, namespace config: %s : %v", + trigger, destination, notificationsAPI.GetConfig().Namespace, err) + errors = append(errors, err) + continue } log.Infof("Trigger %s result: %v", trigger, res) for _, c := range res { - log.Infof("Res When Condition hash: %s, Templates: %s", c.Key, c.Templates) + log.Infof("Result when condition hash: %s, templates: %s", c.Key, c.Templates) s := strings.Split(c.Key, ".")[1] if s != emptyCondition && c.Triggered == true { err = notificationsAPI.Send(objMap, c.Templates, destination) if err != nil { - log.Errorf("notification error: %s", err.Error()) - return err + log.Errorf("Failed to execute the sending of notification on not empty condition, trigger: %s, destination: %s, namespace config: %s : %v", + trigger, destination, notificationsAPI.GetConfig().Namespace, err) + e.NotificationFailedCounter.WithLabelValues(namespace, name, opts.EventType, opts.EventReason).Inc() + errors = append(errors, err) + continue } + e.NotificationSuccessCounter.WithLabelValues(namespace, name, opts.EventType, opts.EventReason).Inc() } else if s == emptyCondition { err = notificationsAPI.Send(objMap, c.Templates, destination) if err != nil { - log.Errorf("notification error: %s", err.Error()) - return err + log.Errorf("Failed to execute the sending of notification on empty condition, trigger: %s, destination: %s, namespace config: %s : %v", + trigger, destination, notificationsAPI.GetConfig().Namespace, err) + e.NotificationFailedCounter.WithLabelValues(namespace, name, opts.EventType, opts.EventReason).Inc() + errors = append(errors, err) + continue } + e.NotificationSuccessCounter.WithLabelValues(namespace, name, opts.EventType, opts.EventReason).Inc() } } } - - return nil + if len(errors) == 0 { + return nil + } + return errors } // This function is copied over from notification engine to make sure we honour emptyCondition diff --git a/utils/record/record_test.go b/utils/record/record_test.go index 6c494a3ac7..97f4452441 100644 --- a/utils/record/record_test.go +++ b/utils/record/record_test.go @@ -113,7 +113,7 @@ func TestSendNotifications(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory //ch := make(chan prometheus.HistogramVec, 1) err := rec.sendNotifications(mockAPI, &r, EventOptions{EventReason: "FooReason"}) - assert.NoError(t, err) + assert.Nil(t, err) } func TestSendNotificationsWhenCondition(t *testing.T) { @@ -140,7 +140,7 @@ func TestSendNotificationsWhenCondition(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory //ch := make(chan prometheus.HistogramVec, 1) err := rec.sendNotifications(mockAPI, &r, EventOptions{EventReason: "FooReason"}) - assert.NoError(t, err) + assert.Nil(t, err) } func TestSendNotificationsWhenConditionTime(t *testing.T) { @@ -340,7 +340,7 @@ func TestSendNotificationsFails(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory err := rec.sendNotifications(mockAPI, &r, EventOptions{EventReason: "FooReason"}) - assert.Error(t, err) + assert.Len(t, err, 1) }) t.Run("GetAPIError", func(t *testing.T) { @@ -349,7 +349,7 @@ func TestSendNotificationsFails(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory err := rec.sendNotifications(nil, &r, EventOptions{EventReason: "FooReason"}) - assert.Error(t, err) + assert.NotNil(t, err) }) } @@ -380,7 +380,7 @@ func TestSendNotificationsFailsWithRunTriggerError(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory err := rec.sendNotifications(mockAPI, &r, EventOptions{EventReason: "FooReason"}) - assert.Error(t, err) + assert.Len(t, err, 1) }) t.Run("GetAPIError", func(t *testing.T) { @@ -389,7 +389,7 @@ func TestSendNotificationsFailsWithRunTriggerError(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory err := rec.sendNotifications(nil, &r, EventOptions{EventReason: "FooReason"}) - assert.Error(t, err) + assert.NotNil(t, err) }) } @@ -419,7 +419,7 @@ func TestSendNotificationsNoTrigger(t *testing.T) { rec.EventRecorderAdapter.apiFactory = apiFactory err := rec.sendNotifications(mockAPI, &r, EventOptions{EventReason: "MissingReason"}) - assert.Error(t, err) + assert.Len(t, err, 1) } func TestNewAPIFactorySettings(t *testing.T) { From f6472fd5d7907949b07a7fb758a84babaf92dd1d Mon Sep 17 00:00:00 2001 From: "Yuan (Terry) Tang" Date: Mon, 9 Oct 2023 18:56:48 -0400 Subject: [PATCH 137/187] fix: Replace antonmedv/expr with expr-lang/expr (#3090) Signed-off-by: Yuan Tang Signed-off-by: Philip Clark --- go.mod | 1 + go.sum | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 8e9b03f62b..dcf303cccb 100644 --- a/go.mod +++ b/go.mod @@ -199,6 +199,7 @@ require ( ) replace ( + github.com/antonmedv/expr => github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 k8s.io/api v0.0.0 => k8s.io/api v0.25.8 k8s.io/apiextensions-apiserver v0.0.0 => k8s.io/apiextensions-apiserver v0.25.8 diff --git a/go.sum b/go.sum index 764feeed8d..6aa0f675cf 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,6 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= -github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= @@ -210,6 +208,8 @@ github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0n github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= +github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 h1:Sg2XxaymeyqqaLG34aB2mvlX+nii916/Gv1ovWc4jMc= +github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= From de923c04834511bef63de0e51a6b9b261b2ca309 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Wed, 11 Oct 2023 07:04:30 -0600 Subject: [PATCH 138/187] fix: revert repo change to expr (#3094) revert repo change to expr Signed-off-by: zachaller Signed-off-by: Philip Clark --- go.mod | 1 - go.sum | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index dcf303cccb..8e9b03f62b 100644 --- a/go.mod +++ b/go.mod @@ -199,7 +199,6 @@ require ( ) replace ( - github.com/antonmedv/expr => github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 k8s.io/api v0.0.0 => k8s.io/api v0.25.8 k8s.io/apiextensions-apiserver v0.0.0 => k8s.io/apiextensions-apiserver v0.25.8 diff --git a/go.sum b/go.sum index 6aa0f675cf..764feeed8d 100644 --- a/go.sum +++ b/go.sum @@ -91,6 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= +github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= @@ -208,8 +210,6 @@ github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0n github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= -github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 h1:Sg2XxaymeyqqaLG34aB2mvlX+nii916/Gv1ovWc4jMc= -github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= From 99883a357e21158850c78e7a3a7af9caaa5ef424 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 08:28:40 -0500 Subject: [PATCH 139/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudwatch from 1.27.7 to 1.27.8 (#3086) chore(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudwatch Bumps [github.com/aws/aws-sdk-go-v2/service/cloudwatch](https://github.com/aws/aws-sdk-go-v2) from 1.27.7 to 1.27.8. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.27.7...service/s3/v1.27.8) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/cloudwatch dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 10 +++++----- go.sum | 16 ++++++++++------ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 8e9b03f62b..546e3c00b1 100644 --- a/go.mod +++ b/go.mod @@ -6,9 +6,9 @@ require ( github.com/antonmedv/expr v1.15.3 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 - github.com/aws/aws-sdk-go-v2 v1.21.0 + github.com/aws/aws-sdk-go-v2 v1.21.1 github.com/aws/aws-sdk-go-v2/config v1.18.43 - github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 + github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible github.com/bombsimon/logrusr/v4 v4.0.0 @@ -84,14 +84,14 @@ require ( github.com/aws/aws-sdk-go v1.44.116 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.13.41 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect - github.com/aws/smithy-go v1.14.2 // indirect + github.com/aws/smithy-go v1.15.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect diff --git a/go.sum b/go.sum index 764feeed8d..5f95f72576 100644 --- a/go.sum +++ b/go.sum @@ -103,22 +103,25 @@ github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2z github.com/aws/aws-sdk-go v1.44.39/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= +github.com/aws/aws-sdk-go-v2 v1.21.1 h1:wjHYshtPpYOZm+/mu3NhVgRRc0baM6LJZOmxPZ5Cwzs= +github.com/aws/aws-sdk-go-v2 v1.21.1/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= github.com/aws/aws-sdk-go-v2/config v1.18.43 h1:IgdUtTRvUDC6eiJBqU6vh7bHFNAEBjQ8S+qJ7zVhDOs= github.com/aws/aws-sdk-go-v2/config v1.18.43/go.mod h1:NiFev8qlgg8MPzw3fO/EwzMZeZwlJEKGwfpjRPA9Nvw= github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9rmEzEhbZFh9JQW/Bg= github.com/aws/aws-sdk-go-v2/credentials v1.13.41/go.mod h1:cc3Fn7DkKbJalPtQnudHGZZ8ml9+hwtbc1CJONsYYqk= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 h1:SijA0mgjV8E+8G45ltVHs0fvKpTj8xmZJ3VwhGKtUSI= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 h1:817VqVe6wvwE46xXy6YF5RywvjOX6U2zRQQ6IbQFK0s= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42/go.mod h1:oDfgXoBBmj+kXnqxDDnIDnC56QBosglKp8ftRCTxR+0= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 h1:7ZApaXzWbo8slc+W5TynuUlB4z66g44h7uqa3/d/BsY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36/go.mod h1:rwr4WnmFi3RJO0M4dxbJtgi9BPLMpVBMX1nUte5ha9U= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 h1:qULF+ElcvjjSEO1+z5x+TmKE9d4yTej7PfpJQPVvexY= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7/go.mod h1:1HKxVrj5wsKy/wb2v07vzTSd+YPV1sDsWxferwPK7PA= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 h1:pdUFDCmsKlwEwVJyq/k3xLBtS/sym3dhBMTCIEDaN40= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8/go.mod h1:EwMPL+Fu95r6yS2UQY99lRR1rDjgCbcPQpy1aQ3fuxE= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= @@ -129,8 +132,9 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaK github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= -github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= +github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= From 09e79aeae6fb114a300a6c6377c61da451c48e2a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 08:28:59 -0500 Subject: [PATCH 140/187] chore(deps): bump github.com/aws/aws-sdk-go-v2 from 1.21.0 to 1.21.1 (#3085) Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.21.0 to 1.21.1. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.21.0...v1.21.1) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark From c7b95315d48f99c96de7596f5af457d6ea08cbb4 Mon Sep 17 00:00:00 2001 From: PranitRout07 Date: Wed, 11 Oct 2023 18:59:53 +0530 Subject: [PATCH 141/187] docs: Ensure image not present between incomplete sentence. (#3079) * Update anti-affinity.md * Update mkdocs.yml Signed-off-by: Philip Clark --- docs/features/anti-affinity/anti-affinity.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/features/anti-affinity/anti-affinity.md b/docs/features/anti-affinity/anti-affinity.md index 3c46171d70..2a547c9c07 100644 --- a/docs/features/anti-affinity/anti-affinity.md +++ b/docs/features/anti-affinity/anti-affinity.md @@ -31,6 +31,7 @@ You can learn more about anti-affinity [here](https://kubernetes.io/docs/concept Repeating the above example with anti-affinity enabled, here is what happens when the `.spec.template` of the Rollout changes. Due to anti-affinity, the new pods cannot be scheduled on nodes which run the old ReplicaSet's pods. As a result, the cluster auto-scaler must create 2 nodes to host the new ReplicaSet's pods. In this case, pods won't be started since the scaled-down nodes are guaranteed to not have the new pods. + ![ Original Rollout is running, spread across two nodes](images/solution.png) ## Enabling Anti-Affinity in Rollouts From 741b6ffb398b5e68f90e7a2c332c12a73702c629 Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Wed, 11 Oct 2023 14:20:16 -0400 Subject: [PATCH 142/187] cleanup Signed-off-by: Philip Clark --- ui/src/app/components/rollout-actions/rollout-actions.tsx | 3 --- ui/src/app/components/rollout-widget/rollout-widget.scss | 3 --- ui/src/app/components/rollout-widget/rollout-widget.tsx | 1 - ui/src/app/components/rollouts-grid/rollouts-grid.tsx | 4 ---- ui/src/app/components/rollouts-home/rollouts-home.tsx | 5 ++--- 5 files changed, 2 insertions(+), 14 deletions(-) diff --git a/ui/src/app/components/rollout-actions/rollout-actions.tsx b/ui/src/app/components/rollout-actions/rollout-actions.tsx index 2eaad61502..81b5ce1ead 100644 --- a/ui/src/app/components/rollout-actions/rollout-actions.tsx +++ b/ui/src/app/components/rollout-actions/rollout-actions.tsx @@ -25,7 +25,6 @@ interface ActionData { shouldConfirm?: boolean; } -// export const RolloutActionButton = (props: {action: RolloutAction; rollout: RolloutInfo; callback?: Function; indicateLoading: boolean; disabled?: boolean}) => { export const RolloutActionButton = React.memo( ({action, rollout, callback, indicateLoading, disabled}: {action: RolloutAction; rollout: RolloutInfo; callback?: Function; indicateLoading: boolean; disabled?: boolean}) => { const [loading, setLoading] = React.useState(false); @@ -92,8 +91,6 @@ export const RolloutActionButton = React.memo( const ap = actionMap.get(action); - // const [loading, setLoading] = React.useState(false); - return ( void /> {(rollout.strategy || '').toLocaleLowerCase() === 'canary' && }
- {/* {(rollout.replicaSets || []).length < 1 && } */}
{rollout.message !== 'CanaryPauseStep' && rollout.message}
diff --git a/ui/src/app/components/rollouts-grid/rollouts-grid.tsx b/ui/src/app/components/rollouts-grid/rollouts-grid.tsx index 1692d637b6..0784257905 100644 --- a/ui/src/app/components/rollouts-grid/rollouts-grid.tsx +++ b/ui/src/app/components/rollouts-grid/rollouts-grid.tsx @@ -5,10 +5,6 @@ import {RolloutInfo} from '../../../models/rollout/rollout'; import {RolloutWidget} from '../rollout-widget/rollout-widget'; export const RolloutsGrid = ({rollouts}: {rollouts: RolloutInfo[]}) => { - // ({ rollouts, onFavoriteChange, favorites }: { rollouts: RolloutInfo[], onFavoriteChange: (rollout: RolloutInfo) => void, favorites: { [key: string]: boolean } }) => { - // const handleFavoriteChange = (rollout: RolloutInfo) => { - // onFavoriteChange(rollout); - // }; return (
{rollouts.map((rollout, i) => ( diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index 6c1766dc32..cb2fde0a00 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -5,10 +5,9 @@ import {faCircleNotch} from '@fortawesome/free-solid-svg-icons'; import {NamespaceContext} from '../../shared/context/api'; import {useWatchRollouts} from '../../shared/services/rollout'; -import {RolloutsToolbar, defaultDisplayMode} from '../rollouts-toolbar/rollouts-toolbar'; +import {RolloutsToolbar, defaultDisplayMode, Filters} from '../rollouts-toolbar/rollouts-toolbar'; import {RolloutsTable} from '../rollouts-table/rollouts-table'; import {RolloutsGrid} from '../rollouts-grid/rollouts-grid'; -import {Filters} from '../rollouts-toolbar/rollouts-toolbar'; import './rollouts-home.scss'; export const RolloutsHome = () => { @@ -49,7 +48,7 @@ export const RolloutsHome = () => { setFavorites(newFavorites); localStorage.setItem('rolloutsFavorites', JSON.stringify(newFavorites)); }; - + const filteredRollouts = React.useMemo(() => { return rollouts.filter((r) => { if (filters.showFavorites && !favorites[r.objectMeta.name]) { From 76a0912736bead780f866579df5d58bc4f30a052 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 08:33:19 -0500 Subject: [PATCH 143/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.38 to 1.18.39 (#3018) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.38 to 1.18.39. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.38...config/v1.18.39) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 18 +++++++++--------- go.sum | 23 +++++++++++------------ 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index 546e3c00b1..00d0d550b6 100644 --- a/go.mod +++ b/go.mod @@ -6,10 +6,10 @@ require ( github.com/antonmedv/expr v1.15.3 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 - github.com/aws/aws-sdk-go-v2 v1.21.1 - github.com/aws/aws-sdk-go-v2/config v1.18.43 - github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 - github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 + github.com/aws/aws-sdk-go-v2 v1.21.0 + github.com/aws/aws-sdk-go-v2/config v1.18.39 + github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 + github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3 github.com/blang/semver v3.5.1+incompatible github.com/bombsimon/logrusr/v4 v4.0.0 github.com/evanphx/json-patch/v5 v5.7.0 @@ -82,16 +82,16 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.41 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.37 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect - github.com/aws/smithy-go v1.15.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 // indirect + github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect diff --git a/go.sum b/go.sum index 5f95f72576..6dbc4c9045 100644 --- a/go.sum +++ b/go.sum @@ -104,12 +104,10 @@ github.com/aws/aws-sdk-go v1.44.39/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4 github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2 v1.21.1 h1:wjHYshtPpYOZm+/mu3NhVgRRc0baM6LJZOmxPZ5Cwzs= -github.com/aws/aws-sdk-go-v2 v1.21.1/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= -github.com/aws/aws-sdk-go-v2/config v1.18.43 h1:IgdUtTRvUDC6eiJBqU6vh7bHFNAEBjQ8S+qJ7zVhDOs= -github.com/aws/aws-sdk-go-v2/config v1.18.43/go.mod h1:NiFev8qlgg8MPzw3fO/EwzMZeZwlJEKGwfpjRPA9Nvw= -github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9rmEzEhbZFh9JQW/Bg= -github.com/aws/aws-sdk-go-v2/credentials v1.13.41/go.mod h1:cc3Fn7DkKbJalPtQnudHGZZ8ml9+hwtbc1CJONsYYqk= +github.com/aws/aws-sdk-go-v2/config v1.18.39 h1:oPVyh6fuu/u4OiW4qcuQyEtk7U7uuNBmHmJSLg1AJsQ= +github.com/aws/aws-sdk-go-v2/config v1.18.39/go.mod h1:+NH/ZigdPckFpgB1TRcRuWCB/Kbbvkxc/iNAKTq5RhE= +github.com/aws/aws-sdk-go-v2/credentials v1.13.37 h1:BvEdm09+ZEh2XtN+PVHPcYwKY3wIeB6pw7vPRM4M9/U= +github.com/aws/aws-sdk-go-v2/credentials v1.13.37/go.mod h1:ACLrdkd4CLZyXOghZ8IYumQbcooAcp2jo/s2xsFH8IM= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= @@ -126,12 +124,13 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeo github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 h1:vuGK1vHNP9zx0PfOrtPumbwR2af0ATQ1Z2H6p75AgRQ= -github.com/aws/aws-sdk-go-v2/service/sso v1.15.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= -github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= -github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 h1:2PylFCfKCEDv6PeSN09pC/VUiRd10wi1VfHG5FrW0/g= +github.com/aws/aws-sdk-go-v2/service/sso v1.13.6/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 h1:pSB560BbVj9ZlJZF4WYj5zsytWHWKxg+NgyGV4B2L58= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 h1:CQBFElb0LS8RojMJlxRSo/HXipvTZW2S44Lt9Mk2aYQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.21.5/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= From 501691ecc1c251fee6119fa19abc4e4f8b8684c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 14:05:27 -0500 Subject: [PATCH 144/187] chore(deps): bump github.com/antonmedv/expr from 1.13.0 to 1.15.1 (#3024) Bumps [github.com/antonmedv/expr](https://github.com/antonmedv/expr) from 1.13.0 to 1.15.1. - [Release notes](https://github.com/antonmedv/expr/releases) - [Commits](https://github.com/antonmedv/expr/compare/v1.13.0...v1.15.1) --- updated-dependencies: - dependency-name: github.com/antonmedv/expr dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 00d0d550b6..6fdd8ffa88 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/argoproj/argo-rollouts go 1.20 require ( - github.com/antonmedv/expr v1.15.3 + github.com/antonmedv/expr v1.15.1 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 diff --git a/go.sum b/go.sum index 6dbc4c9045..3b6229f6d1 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= -github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= +github.com/antonmedv/expr v1.15.1 h1:mxeRIkH8GQJo4MRRFgp0ArlV4AA+0DmcJNXEsG70rGU= +github.com/antonmedv/expr v1.15.1/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= From b0fc99468a45cd51f3a098de9c04c60354dd8c03 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 14:06:00 -0500 Subject: [PATCH 145/187] chore(deps): bump github.com/hashicorp/go-plugin from 1.5.0 to 1.5.1 (#3017) Bumps [github.com/hashicorp/go-plugin](https://github.com/hashicorp/go-plugin) from 1.5.0 to 1.5.1. - [Release notes](https://github.com/hashicorp/go-plugin/releases) - [Changelog](https://github.com/hashicorp/go-plugin/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/go-plugin/compare/v1.5.0...v1.5.1) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6fdd8ffa88..8cc6c5642f 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.3 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/hashicorp/go-plugin v1.5.2 + github.com/hashicorp/go-plugin v1.5.1 github.com/influxdata/influxdb-client-go/v2 v2.12.3 github.com/juju/ansiterm v1.0.0 github.com/machinebox/graphql v0.2.2 diff --git a/go.sum b/go.sum index 3b6229f6d1..733f1c9ff3 100644 --- a/go.sum +++ b/go.sum @@ -405,8 +405,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.14.1 h1:nQcJDQwIAGnmoUWp8ubocEX40cCml/17YkF6csQLReU= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= -github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= +github.com/hashicorp/go-plugin v1.5.1 h1:oGm7cWBaYIp3lJpx1RUEfLWophprE2EV/KUeqBYo+6k= +github.com/hashicorp/go-plugin v1.5.1/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.1/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= From 0bc0fd4c20f21b81c1505dc08684a507b2d013b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Sep 2023 12:03:56 -0500 Subject: [PATCH 146/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 from 1.21.3 to 1.21.4 (#3025) chore(deps): bump github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 Bumps [github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2](https://github.com/aws/aws-sdk-go-v2) from 1.21.3 to 1.21.4. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/efs/v1.21.3...service/efs/v1.21.4) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 8cc6c5642f..f8bb3e3e39 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.21.0 github.com/aws/aws-sdk-go-v2/config v1.18.39 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 - github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3 + github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible github.com/bombsimon/logrusr/v4 v4.0.0 github.com/evanphx/json-patch/v5 v5.7.0 diff --git a/go.sum b/go.sum index 733f1c9ff3..c1e06600fb 100644 --- a/go.sum +++ b/go.sum @@ -114,12 +114,10 @@ github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPne github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 h1:817VqVe6wvwE46xXy6YF5RywvjOX6U2zRQQ6IbQFK0s= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42/go.mod h1:oDfgXoBBmj+kXnqxDDnIDnC56QBosglKp8ftRCTxR+0= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 h1:7ZApaXzWbo8slc+W5TynuUlB4z66g44h7uqa3/d/BsY= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36/go.mod h1:rwr4WnmFi3RJO0M4dxbJtgi9BPLMpVBMX1nUte5ha9U= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 h1:pdUFDCmsKlwEwVJyq/k3xLBtS/sym3dhBMTCIEDaN40= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8/go.mod h1:EwMPL+Fu95r6yS2UQY99lRR1rDjgCbcPQpy1aQ3fuxE= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 h1:GPUcE/Yq7Ur8YSUk6lVkoIMWnJNO0HT18GUzCWCgCI0= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 h1:qULF+ElcvjjSEO1+z5x+TmKE9d4yTej7PfpJQPVvexY= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7/go.mod h1:1HKxVrj5wsKy/wb2v07vzTSd+YPV1sDsWxferwPK7PA= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= From 1241836aaa7d9fed1dbcf530feedc11a11664e70 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:10:00 -0500 Subject: [PATCH 147/187] chore(deps): bump github.com/antonmedv/expr from 1.15.1 to 1.15.2 (#3036) Bumps [github.com/antonmedv/expr](https://github.com/antonmedv/expr) from 1.15.1 to 1.15.2. - [Release notes](https://github.com/antonmedv/expr/releases) - [Commits](https://github.com/antonmedv/expr/compare/v1.15.1...v1.15.2) --- updated-dependencies: - dependency-name: github.com/antonmedv/expr dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f8bb3e3e39..139d02415a 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/argoproj/argo-rollouts go 1.20 require ( - github.com/antonmedv/expr v1.15.1 + github.com/antonmedv/expr v1.15.2 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 diff --git a/go.sum b/go.sum index c1e06600fb..a44a2c0c65 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.1 h1:mxeRIkH8GQJo4MRRFgp0ArlV4AA+0DmcJNXEsG70rGU= -github.com/antonmedv/expr v1.15.1/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= +github.com/antonmedv/expr v1.15.2 h1:afFXpDWIC2n3bF+kTZE1JvFo+c34uaM3sTqh8z0xfdU= +github.com/antonmedv/expr v1.15.2/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= From bc58f47143d3efe49bc70976d459888db00760c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:10:56 -0500 Subject: [PATCH 148/187] chore(deps): bump docker/setup-buildx-action from 2.10.0 to 3.0.0 (#3034) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.10.0 to 3.0.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/885d1462b80bc1c1c7f0b00334ad271f09369c55...f95db51fddba0c2d1ec667646a06c2ce06100226) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/image-reuse.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index eefb23923d..6c98cb9bfc 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -78,7 +78,7 @@ jobs: with: cosign-release: 'v2.0.2' - - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 + - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Setup tags for container image as a CSV type From 3f6b0e097d1c360f040ea77d8513b0e3a0e29e99 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:13:13 -0500 Subject: [PATCH 149/187] chore(deps): bump google.golang.org/grpc from 1.57.0 to 1.58.0 (#3023) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.57.0 to 1.58.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.57.0...v1.58.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 139d02415a..d1c2c9af06 100644 --- a/go.mod +++ b/go.mod @@ -37,7 +37,7 @@ require ( github.com/tj/assert v0.0.3 github.com/valyala/fasttemplate v1.2.2 google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 - google.golang.org/grpc v1.58.2 + google.golang.org/grpc v1.58.0 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.8 diff --git a/go.sum b/go.sum index a44a2c0c65..2b30b8db73 100644 --- a/go.sum +++ b/go.sum @@ -1098,8 +1098,8 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= -google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o= +google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 9898f5f11afb81ba4d78e52798d77beb408d3e3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 12:12:13 -0500 Subject: [PATCH 150/187] chore(deps): bump google.golang.org/grpc from 1.58.0 to 1.58.2 (#3050) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.0 to 1.58.2. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.58.0...v1.58.2) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d1c2c9af06..139d02415a 100644 --- a/go.mod +++ b/go.mod @@ -37,7 +37,7 @@ require ( github.com/tj/assert v0.0.3 github.com/valyala/fasttemplate v1.2.2 google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 - google.golang.org/grpc v1.58.0 + google.golang.org/grpc v1.58.2 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.8 diff --git a/go.sum b/go.sum index 2b30b8db73..a44a2c0c65 100644 --- a/go.sum +++ b/go.sum @@ -1098,8 +1098,8 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o= -google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= +google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 06f29273a7f012b66c6763a14ed88f42303f061c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Sep 2023 21:01:10 -0500 Subject: [PATCH 151/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.39 to 1.18.41 (#3047) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.39 to 1.18.41. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.39...config/v1.18.41) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 139d02415a..991a808888 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.39 + github.com/aws/aws-sdk-go-v2/config v1.18.41 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,15 +82,15 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.37 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.39 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect diff --git a/go.sum b/go.sum index a44a2c0c65..c26796ed4d 100644 --- a/go.sum +++ b/go.sum @@ -104,10 +104,10 @@ github.com/aws/aws-sdk-go v1.44.39/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4 github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.39 h1:oPVyh6fuu/u4OiW4qcuQyEtk7U7uuNBmHmJSLg1AJsQ= -github.com/aws/aws-sdk-go-v2/config v1.18.39/go.mod h1:+NH/ZigdPckFpgB1TRcRuWCB/Kbbvkxc/iNAKTq5RhE= -github.com/aws/aws-sdk-go-v2/credentials v1.13.37 h1:BvEdm09+ZEh2XtN+PVHPcYwKY3wIeB6pw7vPRM4M9/U= -github.com/aws/aws-sdk-go-v2/credentials v1.13.37/go.mod h1:ACLrdkd4CLZyXOghZ8IYumQbcooAcp2jo/s2xsFH8IM= +github.com/aws/aws-sdk-go-v2/config v1.18.41 h1:Go7z97YDsBJVNAaL7pDPKB6LeHEsAkHmFe+CeK30fUQ= +github.com/aws/aws-sdk-go-v2/config v1.18.41/go.mod h1:+yR45+A0LIMKT8bWOKo90Hy9rSrovEmEKoPKLmmVec8= +github.com/aws/aws-sdk-go-v2/credentials v1.13.39 h1:UnwBXDIHKDaejSXaRzKR57IdGCizk+z1DEhnsFpus7Q= +github.com/aws/aws-sdk-go-v2/credentials v1.13.39/go.mod h1:OJ9P239A90TnglJEF3qofKiNeEM6PCV/m+aNGV5WC24= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= @@ -122,12 +122,12 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeo github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 h1:2PylFCfKCEDv6PeSN09pC/VUiRd10wi1VfHG5FrW0/g= -github.com/aws/aws-sdk-go-v2/service/sso v1.13.6/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 h1:pSB560BbVj9ZlJZF4WYj5zsytWHWKxg+NgyGV4B2L58= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= -github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 h1:CQBFElb0LS8RojMJlxRSo/HXipvTZW2S44Lt9Mk2aYQ= -github.com/aws/aws-sdk-go-v2/service/sts v1.21.5/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 h1:AR/hlTsCyk1CwlyKnPFvIMvnONydRjDDRT9OGb0i+/g= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 h1:UniOmlPJelksyP5dGjfRoFTmLDy4/o0HH1lK2Op7zC8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk= +github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= From 0dbd458e4cbad349c4b6e8e1457bcee4eb67b67e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Sep 2023 21:05:26 -0500 Subject: [PATCH 152/187] chore(deps): bump docker/setup-qemu-action from 2.2.0 to 3.0.0 (#3031) Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2.2.0 to 3.0.0. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/2b82ce82d56a2a04d2637cd93a637ae1b359c0a7...68827325e0b33c7199eb31dd4e31fbe9023e06e3) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- .github/workflows/image-reuse.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index 6c98cb9bfc..eefb23923d 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -78,7 +78,7 @@ jobs: with: cosign-release: 'v2.0.2' - - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 + - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Setup tags for container image as a CSV type From 401897326201c2c869e87f2297045aacaaf8dbd6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Sep 2023 21:05:51 -0500 Subject: [PATCH 153/187] chore(deps): bump github.com/antonmedv/expr from 1.15.2 to 1.15.3 (#3046) Bumps [github.com/antonmedv/expr](https://github.com/antonmedv/expr) from 1.15.2 to 1.15.3. - [Release notes](https://github.com/antonmedv/expr/releases) - [Commits](https://github.com/antonmedv/expr/compare/v1.15.2...v1.15.3) --- updated-dependencies: - dependency-name: github.com/antonmedv/expr dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 991a808888..0649c123d3 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/argoproj/argo-rollouts go 1.20 require ( - github.com/antonmedv/expr v1.15.2 + github.com/antonmedv/expr v1.15.3 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 diff --git a/go.sum b/go.sum index c26796ed4d..a3d721eafa 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.2 h1:afFXpDWIC2n3bF+kTZE1JvFo+c34uaM3sTqh8z0xfdU= -github.com/antonmedv/expr v1.15.2/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= +github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= +github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= From 353ca1617bf1e6f217fac62b72637c03088335e6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 07:42:45 -0500 Subject: [PATCH 154/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.41 to 1.18.42 (#3055) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.41 to 1.18.42. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.41...config/v1.18.42) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 12 ++++++------ go.sum | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 0649c123d3..6fcf264f9c 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.41 + github.com/aws/aws-sdk-go-v2/config v1.18.42 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,14 +82,14 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.39 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.40 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect diff --git a/go.sum b/go.sum index a3d721eafa..1e0bd268aa 100644 --- a/go.sum +++ b/go.sum @@ -104,28 +104,28 @@ github.com/aws/aws-sdk-go v1.44.39/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4 github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.41 h1:Go7z97YDsBJVNAaL7pDPKB6LeHEsAkHmFe+CeK30fUQ= -github.com/aws/aws-sdk-go-v2/config v1.18.41/go.mod h1:+yR45+A0LIMKT8bWOKo90Hy9rSrovEmEKoPKLmmVec8= -github.com/aws/aws-sdk-go-v2/credentials v1.13.39 h1:UnwBXDIHKDaejSXaRzKR57IdGCizk+z1DEhnsFpus7Q= -github.com/aws/aws-sdk-go-v2/credentials v1.13.39/go.mod h1:OJ9P239A90TnglJEF3qofKiNeEM6PCV/m+aNGV5WC24= +github.com/aws/aws-sdk-go-v2/config v1.18.42 h1:28jHROB27xZwU0CB88giDSjz7M1Sba3olb5JBGwina8= +github.com/aws/aws-sdk-go-v2/config v1.18.42/go.mod h1:4AZM3nMMxwlG+eZlxvBKqwVbkDLlnN2a4UGTL6HjaZI= +github.com/aws/aws-sdk-go-v2/credentials v1.13.40 h1:s8yOkDh+5b1jUDhMBtngF6zKWLDs84chUk2Vk0c38Og= +github.com/aws/aws-sdk-go-v2/credentials v1.13.40/go.mod h1:VtEHVAAqDWASwdOqj/1huyT6uHbs5s8FUHfDQdky/Rs= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 h1:817VqVe6wvwE46xXy6YF5RywvjOX6U2zRQQ6IbQFK0s= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42/go.mod h1:oDfgXoBBmj+kXnqxDDnIDnC56QBosglKp8ftRCTxR+0= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 h1:GPUcE/Yq7Ur8YSUk6lVkoIMWnJNO0HT18GUzCWCgCI0= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 h1:qULF+ElcvjjSEO1+z5x+TmKE9d4yTej7PfpJQPVvexY= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7/go.mod h1:1HKxVrj5wsKy/wb2v07vzTSd+YPV1sDsWxferwPK7PA= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 h1:AR/hlTsCyk1CwlyKnPFvIMvnONydRjDDRT9OGb0i+/g= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 h1:UniOmlPJelksyP5dGjfRoFTmLDy4/o0HH1lK2Op7zC8= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 h1:YkNzx1RLS0F5qdf9v1Q8Cuv9NXCL2TkosOxhzlUPV64= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.1/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk= github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= From 577ea2a97a0c0cdeef02e50514f0b84eabfb51f5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:37:52 -0500 Subject: [PATCH 155/187] chore(deps): bump github.com/hashicorp/go-plugin from 1.5.1 to 1.5.2 (#3056) Bumps [github.com/hashicorp/go-plugin](https://github.com/hashicorp/go-plugin) from 1.5.1 to 1.5.2. - [Release notes](https://github.com/hashicorp/go-plugin/releases) - [Changelog](https://github.com/hashicorp/go-plugin/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/go-plugin/compare/v1.5.1...v1.5.2) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6fcf264f9c..25a4d14444 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.3 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/hashicorp/go-plugin v1.5.1 + github.com/hashicorp/go-plugin v1.5.2 github.com/influxdata/influxdb-client-go/v2 v2.12.3 github.com/juju/ansiterm v1.0.0 github.com/machinebox/graphql v0.2.2 diff --git a/go.sum b/go.sum index 1e0bd268aa..98686dd4b5 100644 --- a/go.sum +++ b/go.sum @@ -403,8 +403,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.14.1 h1:nQcJDQwIAGnmoUWp8ubocEX40cCml/17YkF6csQLReU= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-plugin v1.5.1 h1:oGm7cWBaYIp3lJpx1RUEfLWophprE2EV/KUeqBYo+6k= -github.com/hashicorp/go-plugin v1.5.1/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.1/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= From 926f89ade331b64d90fc8c6eac04b6bde5314f45 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 08:14:24 -0500 Subject: [PATCH 156/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.42 to 1.18.43 (#3072) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.42 to 1.18.43. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.42...config/v1.18.43) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 25a4d14444..8e9b03f62b 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.42 + github.com/aws/aws-sdk-go-v2/config v1.18.43 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,15 +82,15 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.40 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.41 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect diff --git a/go.sum b/go.sum index 98686dd4b5..5856256bc5 100644 --- a/go.sum +++ b/go.sum @@ -104,10 +104,10 @@ github.com/aws/aws-sdk-go v1.44.39/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4 github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.42 h1:28jHROB27xZwU0CB88giDSjz7M1Sba3olb5JBGwina8= -github.com/aws/aws-sdk-go-v2/config v1.18.42/go.mod h1:4AZM3nMMxwlG+eZlxvBKqwVbkDLlnN2a4UGTL6HjaZI= -github.com/aws/aws-sdk-go-v2/credentials v1.13.40 h1:s8yOkDh+5b1jUDhMBtngF6zKWLDs84chUk2Vk0c38Og= -github.com/aws/aws-sdk-go-v2/credentials v1.13.40/go.mod h1:VtEHVAAqDWASwdOqj/1huyT6uHbs5s8FUHfDQdky/Rs= +github.com/aws/aws-sdk-go-v2/config v1.18.43 h1:IgdUtTRvUDC6eiJBqU6vh7bHFNAEBjQ8S+qJ7zVhDOs= +github.com/aws/aws-sdk-go-v2/config v1.18.43/go.mod h1:NiFev8qlgg8MPzw3fO/EwzMZeZwlJEKGwfpjRPA9Nvw= +github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9rmEzEhbZFh9JQW/Bg= +github.com/aws/aws-sdk-go-v2/credentials v1.13.41/go.mod h1:cc3Fn7DkKbJalPtQnudHGZZ8ml9+hwtbc1CJONsYYqk= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= @@ -122,12 +122,12 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeo github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 h1:YkNzx1RLS0F5qdf9v1Q8Cuv9NXCL2TkosOxhzlUPV64= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.1/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 h1:vuGK1vHNP9zx0PfOrtPumbwR2af0ATQ1Z2H6p75AgRQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= -github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk= -github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= From 21324398ccd94990b7897aedb005e8d5204a95e6 Mon Sep 17 00:00:00 2001 From: "Yuan (Terry) Tang" Date: Mon, 9 Oct 2023 18:56:48 -0400 Subject: [PATCH 157/187] fix: Replace antonmedv/expr with expr-lang/expr (#3090) Signed-off-by: Yuan Tang Signed-off-by: Philip Clark --- go.mod | 1 + go.sum | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 8e9b03f62b..dcf303cccb 100644 --- a/go.mod +++ b/go.mod @@ -199,6 +199,7 @@ require ( ) replace ( + github.com/antonmedv/expr => github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 k8s.io/api v0.0.0 => k8s.io/api v0.25.8 k8s.io/apiextensions-apiserver v0.0.0 => k8s.io/apiextensions-apiserver v0.25.8 diff --git a/go.sum b/go.sum index 5856256bc5..5d00d2fedc 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,6 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= -github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= @@ -211,6 +209,8 @@ github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0n github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= +github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 h1:Sg2XxaymeyqqaLG34aB2mvlX+nii916/Gv1ovWc4jMc= +github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= From 0d3a68d01c80bd6383af74c3f120cd2efd02de3b Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Wed, 11 Oct 2023 07:04:30 -0600 Subject: [PATCH 158/187] fix: revert repo change to expr (#3094) revert repo change to expr Signed-off-by: zachaller Signed-off-by: Philip Clark --- go.mod | 1 - go.sum | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index dcf303cccb..8e9b03f62b 100644 --- a/go.mod +++ b/go.mod @@ -199,7 +199,6 @@ require ( ) replace ( - github.com/antonmedv/expr => github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 k8s.io/api v0.0.0 => k8s.io/api v0.25.8 k8s.io/apiextensions-apiserver v0.0.0 => k8s.io/apiextensions-apiserver v0.25.8 diff --git a/go.sum b/go.sum index 5d00d2fedc..5856256bc5 100644 --- a/go.sum +++ b/go.sum @@ -91,6 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= +github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= @@ -209,8 +211,6 @@ github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0n github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= -github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 h1:Sg2XxaymeyqqaLG34aB2mvlX+nii916/Gv1ovWc4jMc= -github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= From 0f2acb71324f9fdcf148b7c8484875f845c8b94e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 08:28:40 -0500 Subject: [PATCH 159/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudwatch from 1.27.7 to 1.27.8 (#3086) chore(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudwatch Bumps [github.com/aws/aws-sdk-go-v2/service/cloudwatch](https://github.com/aws/aws-sdk-go-v2) from 1.27.7 to 1.27.8. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.27.7...service/s3/v1.27.8) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/cloudwatch dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 10 +++++----- go.sum | 9 ++++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 8e9b03f62b..546e3c00b1 100644 --- a/go.mod +++ b/go.mod @@ -6,9 +6,9 @@ require ( github.com/antonmedv/expr v1.15.3 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 - github.com/aws/aws-sdk-go-v2 v1.21.0 + github.com/aws/aws-sdk-go-v2 v1.21.1 github.com/aws/aws-sdk-go-v2/config v1.18.43 - github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 + github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible github.com/bombsimon/logrusr/v4 v4.0.0 @@ -84,14 +84,14 @@ require ( github.com/aws/aws-sdk-go v1.44.116 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.13.41 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect - github.com/aws/smithy-go v1.14.2 // indirect + github.com/aws/smithy-go v1.15.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect diff --git a/go.sum b/go.sum index 5856256bc5..5f95f72576 100644 --- a/go.sum +++ b/go.sum @@ -104,6 +104,8 @@ github.com/aws/aws-sdk-go v1.44.39/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4 github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= +github.com/aws/aws-sdk-go-v2 v1.21.1 h1:wjHYshtPpYOZm+/mu3NhVgRRc0baM6LJZOmxPZ5Cwzs= +github.com/aws/aws-sdk-go-v2 v1.21.1/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= github.com/aws/aws-sdk-go-v2/config v1.18.43 h1:IgdUtTRvUDC6eiJBqU6vh7bHFNAEBjQ8S+qJ7zVhDOs= github.com/aws/aws-sdk-go-v2/config v1.18.43/go.mod h1:NiFev8qlgg8MPzw3fO/EwzMZeZwlJEKGwfpjRPA9Nvw= github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9rmEzEhbZFh9JQW/Bg= @@ -114,10 +116,12 @@ github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPne github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 h1:817VqVe6wvwE46xXy6YF5RywvjOX6U2zRQQ6IbQFK0s= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42/go.mod h1:oDfgXoBBmj+kXnqxDDnIDnC56QBosglKp8ftRCTxR+0= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 h1:7ZApaXzWbo8slc+W5TynuUlB4z66g44h7uqa3/d/BsY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36/go.mod h1:rwr4WnmFi3RJO0M4dxbJtgi9BPLMpVBMX1nUte5ha9U= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 h1:qULF+ElcvjjSEO1+z5x+TmKE9d4yTej7PfpJQPVvexY= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7/go.mod h1:1HKxVrj5wsKy/wb2v07vzTSd+YPV1sDsWxferwPK7PA= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 h1:pdUFDCmsKlwEwVJyq/k3xLBtS/sym3dhBMTCIEDaN40= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8/go.mod h1:EwMPL+Fu95r6yS2UQY99lRR1rDjgCbcPQpy1aQ3fuxE= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= @@ -128,7 +132,6 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaK github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= -github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= From d6f1f356a45a2450ff10c2b812dd3c7f291c3568 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 08:28:59 -0500 Subject: [PATCH 160/187] chore(deps): bump github.com/aws/aws-sdk-go-v2 from 1.21.0 to 1.21.1 (#3085) Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.21.0 to 1.21.1. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.21.0...v1.21.1) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark From d0bb94558721eac9d261909a11df35daadb040c7 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Wed, 11 Oct 2023 14:38:45 -0600 Subject: [PATCH 161/187] fix: bump notification-engine to fix double send on self server notifications (#3095) * bump notification-engine to fix double send on self server notifications Signed-off-by: zachaller * codegen Signed-off-by: zachaller --------- Signed-off-by: zachaller Signed-off-by: Philip Clark --- .../generated/notification-services/awssqs.md | 106 ++++++++++++++++++ .../generated/notification-services/github.md | 11 +- .../notification-services/googlechat.md | 19 ++-- .../notification-services/grafana.md | 6 + .../notification-services/overview.md | 1 + docs/generated/notification-services/slack.md | 82 +++++++------- go.mod | 12 +- go.sum | 43 +++++-- mkdocs.yml | 1 + 9 files changed, 220 insertions(+), 61 deletions(-) create mode 100755 docs/generated/notification-services/awssqs.md diff --git a/docs/generated/notification-services/awssqs.md b/docs/generated/notification-services/awssqs.md new file mode 100755 index 0000000000..6bbc47cbbc --- /dev/null +++ b/docs/generated/notification-services/awssqs.md @@ -0,0 +1,106 @@ +# AWS SQS + +## Parameters + +This notification service is capable of sending simple messages to AWS SQS queue. + +* `queue` - name of the queue you are intending to send messages to. Can be overwriten with target destination annotation. +* `region` - region of the sqs queue can be provided via env variable AWS_DEFAULT_REGION +* `key` - optional, aws access key must be either referenced from a secret via variable or via env variable AWS_ACCESS_KEY_ID +* `secret` - optional, aws access secret must be either referenced from a secret via variableor via env variable AWS_SECRET_ACCESS_KEY +* `account` optional, external accountId of the queue +* `endpointUrl` optional, useful for development with localstack + +## Example + +### Using Secret for credential retrieval: + +Resource Annotation: +```yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx-deployment + annotations: + notifications.argoproj.io/subscribe.on-deployment-ready.awssqs: "overwrite-myqueue" +``` + +* ConfigMap +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.awssqs: | + region: "us-east-2" + queue: "myqueue" + account: "1234567" + key: "$awsaccess_key" + secret: "$awsaccess_secret" + + template.deployment-ready: | + message: | + Deployment {{.obj.metadata.name}} is ready! + + trigger.on-deployment-ready: | + - when: any(obj.status.conditions, {.type == 'Available' && .status == 'True'}) + send: [deployment-ready] + - oncePer: obj.metadata.annotations["generation"] + +``` + Secret +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: +stringData: + awsaccess_key: test + awsaccess_secret: test +``` + + +### Minimal configuration using AWS Env variables + +Ensure following list of enviromental variable is injected via OIDC, or other method. And assuming SQS is local to the account. +You may skip usage of secret for sensitive data and omit other parameters. (Setting parameters via ConfigMap takes precedent.) + +Variables: + +```bash +export AWS_ACCESS_KEY_ID="test" +export AWS_SECRET_ACCESS_KEY="test" +export AWS_DEFAULT_REGION="us-east-1" +``` + +Resource Annotation: +```yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx-deployment + annotations: + notifications.argoproj.io/subscribe.on-deployment-ready.awssqs: "" +``` + +* ConfigMap +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.awssqs: | + queue: "myqueue" + + template.deployment-ready: | + message: | + Deployment {{.obj.metadata.name}} is ready! + + trigger.on-deployment-ready: | + - when: any(obj.status.conditions, {.type == 'Available' && .status == 'True'}) + send: [deployment-ready] + - oncePer: obj.metadata.annotations["generation"] + +``` diff --git a/docs/generated/notification-services/github.md b/docs/generated/notification-services/github.md index c24ea00f43..913efef6ec 100755 --- a/docs/generated/notification-services/github.md +++ b/docs/generated/notification-services/github.md @@ -12,7 +12,7 @@ The GitHub notification service changes commit status using [GitHub Apps](https: ## Configuration 1. Create a GitHub Apps using https://github.com/settings/apps/new -2. Change repository permissions to enable write commit statuses and/or deployments +2. Change repository permissions to enable write commit statuses and/or deployments and/or pull requests comments ![2](https://user-images.githubusercontent.com/18019529/108397381-3ca57980-725b-11eb-8d17-5b8992dc009e.png) 3. Generate a private key, and download it automatically ![3](https://user-images.githubusercontent.com/18019529/108397926-d4a36300-725b-11eb-83fe-74795c8c3e03.png) @@ -75,8 +75,17 @@ template.app-deployed: | environmentURL: "https://{{.app.metadata.name}}.example.com" logURL: "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true" requiredContexts: [] + autoMerge: true + pullRequestComment: + content: | + Application {{.app.metadata.name}} is now running new version of deployments manifests. + See more here: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true ``` **Notes**: - If the message is set to 140 characters or more, it will be truncated. - If `github.repoURLPath` and `github.revisionPath` are same as above, they can be omitted. +- Automerge is optional and `true` by default for github deployments to ensure the requested ref is up to date with the default branch. + Setting this option to `false` is required if you would like to deploy older refs in your default branch. + For more information see the [Github Deployment API Docs](https://docs.github.com/en/rest/deployments/deployments?apiVersion=2022-11-28#create-a-deployment). +- If `github.pullRequestComment.content` is set to 65536 characters or more, it will be truncated. diff --git a/docs/generated/notification-services/googlechat.md b/docs/generated/notification-services/googlechat.md index 041ea6e022..fa3bdce8da 100755 --- a/docs/generated/notification-services/googlechat.md +++ b/docs/generated/notification-services/googlechat.md @@ -59,24 +59,27 @@ A card message can be defined as follows: ```yaml template.app-sync-succeeded: | googlechat: - cards: | + cardsV2: | - header: title: ArgoCD Bot Notification sections: - widgets: - - textParagraph: + - decoratedText: text: The app {{ .app.metadata.name }} has successfully synced! - widgets: - - keyValue: + - decoratedText: topLabel: Repository - content: {{ call .repo.RepoURLToHTTPS .app.spec.source.repoURL }} - - keyValue: + text: {{ call .repo.RepoURLToHTTPS .app.spec.source.repoURL }} + - decoratedText: topLabel: Revision - content: {{ .app.spec.source.targetRevision }} - - keyValue: + text: {{ .app.spec.source.targetRevision }} + - decoratedText: topLabel: Author - content: {{ (call .repo.GetCommitMetadata .app.status.sync.revision).Author }} + text: {{ (call .repo.GetCommitMetadata .app.status.sync.revision).Author }} ``` +All [Card fields](https://developers.google.com/chat/api/reference/rest/v1/cards#Card_1) are supported and can be used +in notifications. It is also possible to use the previous (now deprecated) `cards` key to use the legacy card fields, +but this is not recommended as Google has deprecated this field and recommends using the newer `cardsV2`. The card message can be written in JSON too. diff --git a/docs/generated/notification-services/grafana.md b/docs/generated/notification-services/grafana.md index ff567b71c1..a36672d0fa 100755 --- a/docs/generated/notification-services/grafana.md +++ b/docs/generated/notification-services/grafana.md @@ -4,6 +4,12 @@ To be able to create Grafana annotation with argocd-notifications you have to cr ![sample](https://user-images.githubusercontent.com/18019529/112024976-0f106080-8b78-11eb-9658-7663305899be.png) +Available parameters : + +* `apiURL` - the server url, e.g. https://grafana.example.com +* `apiKey` - the API key for the serviceaccount +* `insecureSkipVerify` - optional bool, true or false + 1. Login to your Grafana instance as `admin` 2. On the left menu, go to Configuration / API Keys 3. Click "Add API Key" diff --git a/docs/generated/notification-services/overview.md b/docs/generated/notification-services/overview.md index 15e674f654..265e575755 100755 --- a/docs/generated/notification-services/overview.md +++ b/docs/generated/notification-services/overview.md @@ -38,6 +38,7 @@ metadata: ## Service Types +* [AwsSqs](./awssqs.md) * [Email](./email.md) * [GitHub](./github.md) * [Slack](./slack.md) diff --git a/docs/generated/notification-services/slack.md b/docs/generated/notification-services/slack.md index 876445bfec..15937597c1 100755 --- a/docs/generated/notification-services/slack.md +++ b/docs/generated/notification-services/slack.md @@ -29,56 +29,56 @@ The Slack notification service configuration includes following settings: 1. Invite your slack bot to this channel **otherwise slack bot won't be able to deliver notifications to this channel** 1. Store Oauth access token in `argocd-notifications-secret` secret -```yaml - apiVersion: v1 - kind: Secret - metadata: - name: - stringData: - slack-token: -``` + ```yaml + apiVersion: v1 + kind: Secret + metadata: + name: + stringData: + slack-token: + ``` 1. Define service type slack in data section of `argocd-notifications-cm` configmap: -```yaml - apiVersion: v1 - kind: ConfigMap - metadata: - name: - data: - service.slack: | - token: $slack-token -``` + ```yaml + apiVersion: v1 + kind: ConfigMap + metadata: + name: + data: + service.slack: | + token: $slack-token + ``` 1. Add annotation in application yaml file to enable notifications for specific argocd app. The following example uses the [on-sync-succeeded trigger](../catalog.md#triggers): -```yaml - apiVersion: argoproj.io/v1alpha1 - kind: Application - metadata: - annotations: - notifications.argoproj.io/subscribe.on-sync-succeeded.slack: my_channel -``` + ```yaml + apiVersion: argoproj.io/v1alpha1 + kind: Application + metadata: + annotations: + notifications.argoproj.io/subscribe.on-sync-succeeded.slack: my_channel + ``` 1. Annotation with more than one [trigger](../catalog.md#triggers), with multiple destinations and recipients -```yaml - apiVersion: argoproj.io/v1alpha1 - kind: Application - metadata: - annotations: - notifications.argoproj.io/subscriptions: | - - trigger: [on-scaling-replica-set, on-rollout-updated, on-rollout-step-completed] - destinations: - - service: slack - recipients: [my-channel-1, my-channel-2] - - service: email - recipients: [recipient-1, recipient-2, recipient-3 ] - - trigger: [on-rollout-aborted, on-analysis-run-failed, on-analysis-run-error] - destinations: - - service: slack - recipients: [my-channel-21, my-channel-22] -``` + ```yaml + apiVersion: argoproj.io/v1alpha1 + kind: Application + metadata: + annotations: + notifications.argoproj.io/subscriptions: | + - trigger: [on-scaling-replica-set, on-rollout-updated, on-rollout-step-completed] + destinations: + - service: slack + recipients: [my-channel-1, my-channel-2] + - service: email + recipients: [recipient-1, recipient-2, recipient-3 ] + - trigger: [on-rollout-aborted, on-analysis-run-failed, on-analysis-run-error] + destinations: + - service: slack + recipients: [my-channel-21, my-channel-22] + ``` ## Templates diff --git a/go.mod b/go.mod index 546e3c00b1..960313468e 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/antonmedv/expr v1.15.3 - github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 + github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.1 github.com/aws/aws-sdk-go-v2/config v1.18.43 @@ -88,6 +88,7 @@ require ( github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect + github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect @@ -120,10 +121,13 @@ require ( github.com/google/go-github/v53 v53.0.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect + github.com/google/s2a-go v0.1.4 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect + github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect - github.com/gregdel/pushover v1.1.0 // indirect + github.com/gregdel/pushover v1.2.1 // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v0.14.1 // indirect @@ -162,7 +166,7 @@ require ( github.com/prometheus/procfs v0.10.1 // indirect github.com/shopspring/decimal v1.2.0 // indirect github.com/slack-go/slack v0.12.2 // indirect - github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/cast v1.5.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.0 // indirect github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80 // indirect @@ -170,6 +174,7 @@ require ( github.com/valyala/fastjson v1.6.3 // indirect github.com/whilp/git-urls v0.0.0-20191001220047-6db9661140c0 // indirect github.com/xlab/treeprint v1.1.0 // indirect + go.opencensus.io v0.24.0 // indirect go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect golang.org/x/crypto v0.11.0 // indirect golang.org/x/mod v0.8.0 // indirect @@ -182,6 +187,7 @@ require ( golang.org/x/tools v0.6.0 // indirect gomodules.xyz/envconfig v1.3.1-0.20190308184047-426f31af0d45 // indirect gomodules.xyz/notify v0.1.1 // indirect + google.golang.org/api v0.132.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect diff --git a/go.sum b/go.sum index 5f95f72576..921fda31fc 100644 --- a/go.sum +++ b/go.sum @@ -94,8 +94,8 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= -github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= -github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= +github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee h1:ZYILioq4v6OIsr7uh0Pcx7JY4KpJ9qs8qbjRqM6HWMY= +github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee/go.mod h1:VG9FXG0ddIVGc7NcSTRapaUjCPCYqOji//z6mmBYwCE= github.com/argoproj/pkg v0.13.6 h1:36WPD9MNYECHcO1/R1pj6teYspiK7uMQLCgLGft2abM= github.com/argoproj/pkg v0.13.6/go.mod h1:I698DoJBKuvNFaixh4vFl2C88cNIT1WS7KCbz5ewyF8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= @@ -103,6 +103,7 @@ github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2z github.com/aws/aws-sdk-go v1.44.39/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go-v2 v1.17.3/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= github.com/aws/aws-sdk-go-v2 v1.21.1 h1:wjHYshtPpYOZm+/mu3NhVgRRc0baM6LJZOmxPZ5Cwzs= github.com/aws/aws-sdk-go-v2 v1.21.1/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= @@ -112,9 +113,11 @@ github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9r github.com/aws/aws-sdk-go-v2/credentials v1.13.41/go.mod h1:cc3Fn7DkKbJalPtQnudHGZZ8ml9+hwtbc1CJONsYYqk= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.27/go.mod h1:a1/UpzeyBBerajpnP5nGZa9mGzsBn5cOKxm6NWQsvoI= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 h1:817VqVe6wvwE46xXy6YF5RywvjOX6U2zRQQ6IbQFK0s= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42/go.mod h1:oDfgXoBBmj+kXnqxDDnIDnC56QBosglKp8ftRCTxR+0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.21/go.mod h1:+Gxn8jYn5k9ebfHEqlhrMirFjSW0v0C9fI+KN5vk2kE= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 h1:7ZApaXzWbo8slc+W5TynuUlB4z66g44h7uqa3/d/BsY= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36/go.mod h1:rwr4WnmFi3RJO0M4dxbJtgi9BPLMpVBMX1nUte5ha9U= @@ -126,12 +129,15 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeo github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= +github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0 h1:tQoMg8i4nFAB70cJ4wiAYEiZRYo2P6uDmU2D6ys/igo= +github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0/go.mod h1:jQhN5f4p3PALMNlUtfb/0wGIFlV7vGtJlPDVfxfNfPY= github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 h1:vuGK1vHNP9zx0PfOrtPumbwR2af0ATQ1Z2H6p75AgRQ= github.com/aws/aws-sdk-go-v2/service/sso v1.15.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= @@ -170,7 +176,11 @@ github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEM github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -205,6 +215,7 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0yf/KaRKURN6nyi7A9IZydMivZEm9oQLWNjfKDc= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -222,7 +233,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/getkin/kin-openapi v0.94.0/go.mod h1:LWZfzOd7PRy8GJ1dJ6mCU6tNdSfOwRac1BUPam4aw6Q= @@ -344,6 +355,7 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -372,14 +384,20 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvkiqTYKBCKLNmlge2eVjoZfySzM= +github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= @@ -392,8 +410,8 @@ github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoA github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gregdel/pushover v1.1.0 h1:dwHyvrcpZCOS9V1fAnKPaGRRI5OC55cVaKhMybqNsKQ= -github.com/gregdel/pushover v1.1.0/go.mod h1:EcaO66Nn1StkpEm1iKtBTV3d2A16SoMsVER1PthX7to= +github.com/gregdel/pushover v1.2.1 h1:IPPJCdzXz60gMqnlzS0ZAW5z5aS1gI4nU+YM0Pe+ssA= +github.com/gregdel/pushover v1.2.1/go.mod h1:EcaO66Nn1StkpEm1iKtBTV3d2A16SoMsVER1PthX7to= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= @@ -627,8 +645,8 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= @@ -658,8 +676,8 @@ github.com/spaceapegames/go-wavefront v1.8.1/go.mod h1:GtdIjtJ0URkfPmaKx0+7vMSDv github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= +github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= @@ -685,6 +703,7 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= @@ -721,6 +740,8 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee331t6JAXeK2bcyhLOOc= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= @@ -739,6 +760,7 @@ golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220513210258-46612604a0f9/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= @@ -948,6 +970,7 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= @@ -1041,6 +1064,8 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.132.0 h1:8t2/+qZ26kAOGSmOiHwVycqVaDg7q3JDILrNi/Z6rvc= +google.golang.org/api v0.132.0/go.mod h1:AeTBC6GpJnJSRJjktDcPX0QwtS8pGYZOV6MSuSCusw0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1099,8 +1124,10 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/mkdocs.yml b/mkdocs.yml index 471359c778..8506973d4f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -75,6 +75,7 @@ nav: - Overview: features/notifications.md - Services: - generated/notification-services/alertmanager.md + - generated/notification-services/awssqs.md - generated/notification-services/email.md - generated/notification-services/github.md - generated/notification-services/googlechat.md From 1f8e944f1e1281cf24237d8b9c707a27096cf959 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Thu, 12 Oct 2023 13:00:01 -0600 Subject: [PATCH 162/187] fix: keep rs informer updated (#3091) * keep rs informer updated Signed-off-by: zachaller * correct bad log Signed-off-by: zachaller * add error context Signed-off-by: zachaller --------- Signed-off-by: zachaller Signed-off-by: Philip Clark --- rollout/controller.go | 3 ++- rollout/replicaset.go | 4 +++- rollout/replicaset_test.go | 21 +++++++++++++++++---- rollout/sync.go | 10 +++++++++- 4 files changed, 31 insertions(+), 7 deletions(-) diff --git a/rollout/controller.go b/rollout/controller.go index ebc17c1303..1d7d8cde92 100644 --- a/rollout/controller.go +++ b/rollout/controller.go @@ -132,6 +132,7 @@ type reconcilerBase struct { replicaSetSynced cache.InformerSynced rolloutsInformer cache.SharedIndexInformer rolloutsLister listers.RolloutLister + replicaSetInformer cache.SharedIndexInformer rolloutsSynced cache.InformerSynced rolloutsIndexer cache.Indexer servicesLister v1.ServiceLister @@ -176,7 +177,6 @@ func NewController(cfg ControllerConfig) *Controller { controllerutil.EnqueueAfter(obj, duration, cfg.RolloutWorkQueue) }, } - base := reconcilerBase{ kubeclientset: cfg.KubeClientSet, argoprojclientset: cfg.ArgoProjClientset, @@ -185,6 +185,7 @@ func NewController(cfg ControllerConfig) *Controller { replicaSetLister: cfg.ReplicaSetInformer.Lister(), replicaSetSynced: cfg.ReplicaSetInformer.Informer().HasSynced, rolloutsInformer: cfg.RolloutsInformer.Informer(), + replicaSetInformer: cfg.ReplicaSetInformer.Informer(), rolloutsIndexer: cfg.RolloutsInformer.Informer().GetIndexer(), rolloutsLister: cfg.RolloutsInformer.Lister(), rolloutsSynced: cfg.RolloutsInformer.Informer().HasSynced, diff --git a/rollout/replicaset.go b/rollout/replicaset.go index dceff65aa0..fad23e756e 100644 --- a/rollout/replicaset.go +++ b/rollout/replicaset.go @@ -35,6 +35,7 @@ func (c *rolloutContext) removeScaleDownDelay(rs *appsv1.ReplicaSet) error { _, err := c.kubeclientset.AppsV1().ReplicaSets(rs.Namespace).Patch(ctx, rs.Name, patchtypes.JSONPatchType, []byte(patch), metav1.PatchOptions{}) if err == nil { c.log.Infof("Removed '%s' annotation from RS '%s'", v1alpha1.DefaultReplicaSetScaleDownDeadlineAnnotationKey, rs.Name) + c.replicaSetInformer.GetIndexer().Update(rs) } return err } @@ -56,9 +57,10 @@ func (c *rolloutContext) addScaleDownDelay(rs *appsv1.ReplicaSet, scaleDownDelay } deadline := timeutil.MetaNow().Add(scaleDownDelaySeconds).UTC().Format(time.RFC3339) patch := fmt.Sprintf(addScaleDownAtAnnotationsPatch, v1alpha1.DefaultReplicaSetScaleDownDeadlineAnnotationKey, deadline) - _, err := c.kubeclientset.AppsV1().ReplicaSets(rs.Namespace).Patch(ctx, rs.Name, patchtypes.JSONPatchType, []byte(patch), metav1.PatchOptions{}) + rs, err := c.kubeclientset.AppsV1().ReplicaSets(rs.Namespace).Patch(ctx, rs.Name, patchtypes.JSONPatchType, []byte(patch), metav1.PatchOptions{}) if err == nil { c.log.Infof("Set '%s' annotation on '%s' to %s (%s)", v1alpha1.DefaultReplicaSetScaleDownDeadlineAnnotationKey, rs.Name, deadline, scaleDownDelaySeconds) + c.replicaSetInformer.GetIndexer().Update(rs) } return err } diff --git a/rollout/replicaset_test.go b/rollout/replicaset_test.go index 26b05b5b54..10c1dc0893 100644 --- a/rollout/replicaset_test.go +++ b/rollout/replicaset_test.go @@ -195,16 +195,29 @@ func TestReconcileNewReplicaSet(t *testing.T) { rollout := newBlueGreenRollout("foo", test.rolloutReplicas, nil, "", "") fake := fake.Clientset{} k8sfake := k8sfake.Clientset{} + + f := newFixture(t) + defer f.Close() + f.objects = append(f.objects, rollout) + f.replicaSetLister = append(f.replicaSetLister, oldRS, newRS) + f.kubeobjects = append(f.kubeobjects, oldRS, newRS) + _, informers, k8sInformer := f.newController(noResyncPeriodFunc) + stopCh := make(chan struct{}) + informers.Start(stopCh) + informers.WaitForCacheSync(stopCh) + close(stopCh) + roCtx := rolloutContext{ log: logutil.WithRollout(rollout), rollout: rollout, newRS: newRS, stableRS: oldRS, reconcilerBase: reconcilerBase{ - argoprojclientset: &fake, - kubeclientset: &k8sfake, - recorder: record.NewFakeEventRecorder(), - resyncPeriod: 30 * time.Second, + argoprojclientset: &fake, + kubeclientset: &k8sfake, + recorder: record.NewFakeEventRecorder(), + resyncPeriod: 30 * time.Second, + replicaSetInformer: k8sInformer.Apps().V1().ReplicaSets().Informer(), }, pauseContext: &pauseContext{ rollout: rollout, diff --git a/rollout/sync.go b/rollout/sync.go index f13a3489c7..25c0c14813 100644 --- a/rollout/sync.go +++ b/rollout/sync.go @@ -85,7 +85,14 @@ func (c *rolloutContext) syncReplicaSetRevision() (*appsv1.ReplicaSet, error) { if annotationsUpdated || minReadySecondsNeedsUpdate || affinityNeedsUpdate { rsCopy.Spec.MinReadySeconds = c.rollout.Spec.MinReadySeconds rsCopy.Spec.Template.Spec.Affinity = replicasetutil.GenerateReplicaSetAffinity(*c.rollout) - return c.kubeclientset.AppsV1().ReplicaSets(rsCopy.ObjectMeta.Namespace).Update(ctx, rsCopy, metav1.UpdateOptions{}) + rs, err := c.kubeclientset.AppsV1().ReplicaSets(rsCopy.ObjectMeta.Namespace).Update(ctx, rsCopy, metav1.UpdateOptions{}) + if err != nil { + c.log.WithError(err).Error("Error: updating replicaset revision") + return nil, fmt.Errorf("error updating replicaset revision: %v", err) + } + c.log.Infof("Synced revision on ReplicaSet '%s' to '%s'", rs.Name, newRevision) + c.replicaSetInformer.GetIndexer().Update(rs) + return rs, nil } // Should use the revision in existingNewRS's annotation, since it set by before @@ -370,6 +377,7 @@ func (c *rolloutContext) scaleReplicaSet(rs *appsv1.ReplicaSet, newScale int32, scaled = true revision, _ := replicasetutil.Revision(rs) c.recorder.Eventf(rollout, record.EventOptions{EventReason: conditions.ScalingReplicaSetReason}, conditions.ScalingReplicaSetMessage, scalingOperation, rs.Name, revision, oldScale, newScale) + c.replicaSetInformer.GetIndexer().Update(rs) } } return scaled, rs, err From 1482779fdf4c131877c23de361d0a20102fd9ba9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 14:00:20 -0500 Subject: [PATCH 163/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.43 to 1.18.44 (#3099) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.43 to 1.18.44. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.43...config/v1.18.44) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 16 ++++++++-------- go.sum | 32 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/go.mod b/go.mod index 960313468e..5f235803b0 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.1 - github.com/aws/aws-sdk-go-v2/config v1.18.43 + github.com/aws/aws-sdk-go-v2/config v1.18.44 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,16 +82,16 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.41 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.42 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.12 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.3.44 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.36 // indirect github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.15.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.23.1 // indirect github.com/aws/smithy-go v1.15.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect diff --git a/go.sum b/go.sum index 921fda31fc..28a9b2f2cd 100644 --- a/go.sum +++ b/go.sum @@ -107,12 +107,12 @@ github.com/aws/aws-sdk-go-v2 v1.17.3/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3eP github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= github.com/aws/aws-sdk-go-v2 v1.21.1 h1:wjHYshtPpYOZm+/mu3NhVgRRc0baM6LJZOmxPZ5Cwzs= github.com/aws/aws-sdk-go-v2 v1.21.1/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= -github.com/aws/aws-sdk-go-v2/config v1.18.43 h1:IgdUtTRvUDC6eiJBqU6vh7bHFNAEBjQ8S+qJ7zVhDOs= -github.com/aws/aws-sdk-go-v2/config v1.18.43/go.mod h1:NiFev8qlgg8MPzw3fO/EwzMZeZwlJEKGwfpjRPA9Nvw= -github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9rmEzEhbZFh9JQW/Bg= -github.com/aws/aws-sdk-go-v2/credentials v1.13.41/go.mod h1:cc3Fn7DkKbJalPtQnudHGZZ8ml9+hwtbc1CJONsYYqk= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= +github.com/aws/aws-sdk-go-v2/config v1.18.44 h1:U10NQ3OxiY0dGGozmVIENIDnCT0W432PWxk2VO8wGnY= +github.com/aws/aws-sdk-go-v2/config v1.18.44/go.mod h1:pHxnQBldd0heEdJmolLBk78D1Bf69YnKLY3LOpFImlU= +github.com/aws/aws-sdk-go-v2/credentials v1.13.42 h1:KMkjpZqcMOwtRHChVlHdNxTUUAC6NC/b58mRZDIdcRg= +github.com/aws/aws-sdk-go-v2/credentials v1.13.42/go.mod h1:7ltKclhvEB8305sBhrpls24HGxORl6qgnQqSJ314Uw8= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.12 h1:3j5lrl9kVQrJ1BU4O0z7MQ8sa+UXdiLuo4j0V+odNI8= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.12/go.mod h1:JbFpcHDBdsex1zpIKuVRorZSQiZEyc3MykNCcjgz174= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.27/go.mod h1:a1/UpzeyBBerajpnP5nGZa9mGzsBn5cOKxm6NWQsvoI= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 h1:817VqVe6wvwE46xXy6YF5RywvjOX6U2zRQQ6IbQFK0s= @@ -121,22 +121,22 @@ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.21/go.mod h1:+Gxn8jYn5k9 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 h1:7ZApaXzWbo8slc+W5TynuUlB4z66g44h7uqa3/d/BsY= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36/go.mod h1:rwr4WnmFi3RJO0M4dxbJtgi9BPLMpVBMX1nUte5ha9U= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.44 h1:quOJOqlbSfeJTboXLjYXM1M9T52LBXqLoTPlmsKLpBo= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.44/go.mod h1:LNy+P1+1LiRcCsVYr/4zG5n8zWFL0xsvZkOybjbftm8= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 h1:pdUFDCmsKlwEwVJyq/k3xLBtS/sym3dhBMTCIEDaN40= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8/go.mod h1:EwMPL+Fu95r6yS2UQY99lRR1rDjgCbcPQpy1aQ3fuxE= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.36 h1:YXlm7LxwNlauqb2OrinWlcvtsflTzP8GaMvYfQBhoT4= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.36/go.mod h1:ou9ffqJ9hKOVZmjlC6kQ6oROAyG1M4yBKzR+9BKbDwk= github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0 h1:tQoMg8i4nFAB70cJ4wiAYEiZRYo2P6uDmU2D6ys/igo= github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0/go.mod h1:jQhN5f4p3PALMNlUtfb/0wGIFlV7vGtJlPDVfxfNfPY= -github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 h1:vuGK1vHNP9zx0PfOrtPumbwR2af0ATQ1Z2H6p75AgRQ= -github.com/aws/aws-sdk-go-v2/service/sso v1.15.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= -github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= -github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.1 h1:ZN3bxw9OYC5D6umLw6f57rNJfGfhg1DIAAcKpzyUTOE= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.1/go.mod h1:PieckvBoT5HtyB9AsJRrYZFY2Z+EyfVM/9zG6gbV8DQ= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.2 h1:fSCCJuT5i6ht8TqGdZc5Q5K9pz/atrf7qH4iK5C9XzU= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.2/go.mod h1:5eNtr+vNc5vVd92q7SJ+U/HszsIdhZBEyi9dkMRKsp8= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.1 h1:ASNYk1ypWAxRhJjKS0jBnTUeDl7HROOpeSMu1xDA/I8= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.1/go.mod h1:2cnsAhVT3mqusovc2stUSUrSBGTcX9nh8Tu6xh//2eI= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= From 7fd0fd16338e2b39bdd8e67c43d9a274b536be77 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 14:00:41 -0500 Subject: [PATCH 164/187] chore(deps): bump google.golang.org/grpc from 1.58.2 to 1.58.3 (#3098) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.2 to 1.58.3. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.58.2...v1.58.3) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5f235803b0..6d5a1d7515 100644 --- a/go.mod +++ b/go.mod @@ -37,7 +37,7 @@ require ( github.com/tj/assert v0.0.3 github.com/valyala/fasttemplate v1.2.2 google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 - google.golang.org/grpc v1.58.2 + google.golang.org/grpc v1.58.3 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.8 diff --git a/go.sum b/go.sum index 28a9b2f2cd..e0641f0d22 100644 --- a/go.sum +++ b/go.sum @@ -1128,8 +1128,8 @@ google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= -google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= +google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 53f2013499a029257ceb0ca7bd8d52db1bfa311e Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Fri, 13 Oct 2023 09:52:51 -0400 Subject: [PATCH 165/187] reduce complexity of filters Signed-off-by: Philip Clark --- .../rollouts-home/rollouts-home.tsx | 53 ++++++++++--------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index cb2fde0a00..b81bf2d6d4 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -8,6 +8,7 @@ import {useWatchRollouts} from '../../shared/services/rollout'; import {RolloutsToolbar, defaultDisplayMode, Filters} from '../rollouts-toolbar/rollouts-toolbar'; import {RolloutsTable} from '../rollouts-table/rollouts-table'; import {RolloutsGrid} from '../rollouts-grid/rollouts-grid'; +import {RolloutRolloutInfo } from '../../../models/rollout/generated'; import './rollouts-home.scss'; export const RolloutsHome = () => { @@ -49,33 +50,33 @@ export const RolloutsHome = () => { localStorage.setItem('rolloutsFavorites', JSON.stringify(newFavorites)); }; + const isFavorite = (r: RolloutRolloutInfo) => filters.showFavorites && !favorites[r.objectMeta.name]; + + const requiresAttention = (r: RolloutRolloutInfo) => filters.showRequiresAttention && r.status !== 'Degraded' && r.status !== 'Paused' && r.message !== 'CanaryPauseStep'; + + const hasStatusFilter = (r: RolloutRolloutInfo) => Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]; + + const nameMatches = (r: RolloutRolloutInfo) => { + let nameMatches = false; + for (let term of filters.name.split(',').map((t) => t.trim())) { + if (term === '') continue; // Skip empty terms + if (term.startsWith('!')) { + if (!r.objectMeta.name.includes(term.substring(1))) { + nameMatches = true; + break; + } + } else if (r.objectMeta.name.includes(term)) { + nameMatches = true; + break; + } + } + return filters.name === '' || nameMatches; + }; + const filteredRollouts = React.useMemo(() => { - return rollouts.filter((r) => { - if (filters.showFavorites && !favorites[r.objectMeta.name]) { - return false; - } - if (filters.showRequiresAttention && r.status !== 'Degraded' && r.status !== 'Paused' && r.message !== 'CanaryPauseStep') { - return false; - } - if (Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]) { - return false; - } - let nameMatches = false; - for (let term of filters.name.split(',').map((t) => t.trim())) { - if (term === '') continue; // Skip empty terms - if (term.startsWith('!')) { - if (!r.objectMeta.name.includes(term.substring(1))) { - nameMatches = true; - break; - } - } else if (r.objectMeta.name.includes(term)) { - nameMatches = true; - break; - } - } - if (filters.name != '' && !nameMatches) return false; - return true; - }); + return rollouts.filter((r) => { + return isFavorite(r) || requiresAttention(r) || hasStatusFilter(r) || nameMatches(r); + }); }, [rollouts, filters, favorites]); return ( From fe58f7c7b7c70858688101127849285cb21b644c Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Fri, 13 Oct 2023 10:51:46 -0400 Subject: [PATCH 166/187] filters logic working Signed-off-by: Philip Clark --- .../rollouts-home/rollouts-home.tsx | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index b81bf2d6d4..4329c6b952 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -50,11 +50,17 @@ export const RolloutsHome = () => { localStorage.setItem('rolloutsFavorites', JSON.stringify(newFavorites)); }; - const isFavorite = (r: RolloutRolloutInfo) => filters.showFavorites && !favorites[r.objectMeta.name]; + const isFavorite = (r: RolloutRolloutInfo) => { + return filters.showFavorites && favorites[r.objectMeta.name]; + } - const requiresAttention = (r: RolloutRolloutInfo) => filters.showRequiresAttention && r.status !== 'Degraded' && r.status !== 'Paused' && r.message !== 'CanaryPauseStep'; + const requiresAttention = (r: RolloutRolloutInfo) => { + return filters.showRequiresAttention && (r.status === 'Degraded' || (r.status === 'Paused' && r.message !== 'CanaryPauseStep')); + } - const hasStatusFilter = (r: RolloutRolloutInfo) => Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]; + const hasStatusFilter = (r: RolloutRolloutInfo) => { + return filters.status[r.status]; + } const nameMatches = (r: RolloutRolloutInfo) => { let nameMatches = false; @@ -74,9 +80,14 @@ export const RolloutsHome = () => { }; const filteredRollouts = React.useMemo(() => { - return rollouts.filter((r) => { - return isFavorite(r) || requiresAttention(r) || hasStatusFilter(r) || nameMatches(r); - }); + return rollouts.filter((r) => { + // Only include the status filter if one of them is enabled + if (Object.values(filters.status).some((v: boolean) => v === true)) { + return isFavorite(r) || requiresAttention(r) || nameMatches(r) || hasStatusFilter(r); + } else { + return isFavorite(r) || requiresAttention(r) || nameMatches(r); + } + }); }, [rollouts, filters, favorites]); return ( From 2ac6e889fca3d421b292a72a105bc86291238108 Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Sat, 14 Oct 2023 21:45:50 -0400 Subject: [PATCH 167/187] fix filters Signed-off-by: Philip Clark --- .../rollouts-home/rollouts-home.tsx | 58 ++++++++----------- 1 file changed, 23 insertions(+), 35 deletions(-) diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index 4329c6b952..cb2fde0a00 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -8,7 +8,6 @@ import {useWatchRollouts} from '../../shared/services/rollout'; import {RolloutsToolbar, defaultDisplayMode, Filters} from '../rollouts-toolbar/rollouts-toolbar'; import {RolloutsTable} from '../rollouts-table/rollouts-table'; import {RolloutsGrid} from '../rollouts-grid/rollouts-grid'; -import {RolloutRolloutInfo } from '../../../models/rollout/generated'; import './rollouts-home.scss'; export const RolloutsHome = () => { @@ -50,43 +49,32 @@ export const RolloutsHome = () => { localStorage.setItem('rolloutsFavorites', JSON.stringify(newFavorites)); }; - const isFavorite = (r: RolloutRolloutInfo) => { - return filters.showFavorites && favorites[r.objectMeta.name]; - } - - const requiresAttention = (r: RolloutRolloutInfo) => { - return filters.showRequiresAttention && (r.status === 'Degraded' || (r.status === 'Paused' && r.message !== 'CanaryPauseStep')); - } - - const hasStatusFilter = (r: RolloutRolloutInfo) => { - return filters.status[r.status]; - } - - const nameMatches = (r: RolloutRolloutInfo) => { - let nameMatches = false; - for (let term of filters.name.split(',').map((t) => t.trim())) { - if (term === '') continue; // Skip empty terms - if (term.startsWith('!')) { - if (!r.objectMeta.name.includes(term.substring(1))) { - nameMatches = true; - break; - } - } else if (r.objectMeta.name.includes(term)) { - nameMatches = true; - break; - } - } - return filters.name === '' || nameMatches; - }; - const filteredRollouts = React.useMemo(() => { return rollouts.filter((r) => { - // Only include the status filter if one of them is enabled - if (Object.values(filters.status).some((v: boolean) => v === true)) { - return isFavorite(r) || requiresAttention(r) || nameMatches(r) || hasStatusFilter(r); - } else { - return isFavorite(r) || requiresAttention(r) || nameMatches(r); + if (filters.showFavorites && !favorites[r.objectMeta.name]) { + return false; + } + if (filters.showRequiresAttention && r.status !== 'Degraded' && r.status !== 'Paused' && r.message !== 'CanaryPauseStep') { + return false; + } + if (Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]) { + return false; + } + let nameMatches = false; + for (let term of filters.name.split(',').map((t) => t.trim())) { + if (term === '') continue; // Skip empty terms + if (term.startsWith('!')) { + if (!r.objectMeta.name.includes(term.substring(1))) { + nameMatches = true; + break; + } + } else if (r.objectMeta.name.includes(term)) { + nameMatches = true; + break; + } } + if (filters.name != '' && !nameMatches) return false; + return true; }); }, [rollouts, filters, favorites]); From 2e4e68ed9622d95e76c6a675a55646929870dd9f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 31 Aug 2023 22:21:17 -0500 Subject: [PATCH 168/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.37 to 1.18.38 (#3002) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.37 to 1.18.38. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.37...config/v1.18.38) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 29 ++++++++++++++--------------- go.sum | 50 ++++++++++++++++++++++---------------------------- 2 files changed, 36 insertions(+), 43 deletions(-) diff --git a/go.mod b/go.mod index 6d5a1d7515..2de4012eff 100644 --- a/go.mod +++ b/go.mod @@ -6,10 +6,10 @@ require ( github.com/antonmedv/expr v1.15.3 github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee github.com/argoproj/pkg v0.13.6 - github.com/aws/aws-sdk-go-v2 v1.21.1 - github.com/aws/aws-sdk-go-v2/config v1.18.44 - github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 - github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 + github.com/aws/aws-sdk-go-v2 v1.21.0 + github.com/aws/aws-sdk-go-v2/config v1.18.38 + github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 + github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3 github.com/blang/semver v3.5.1+incompatible github.com/bombsimon/logrusr/v4 v4.0.0 github.com/evanphx/json-patch/v5 v5.7.0 @@ -82,17 +82,16 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.42 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.12 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.3.44 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.36 // indirect - github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.15.1 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.23.1 // indirect - github.com/aws/smithy-go v1.15.0 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.36 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 // indirect + github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect diff --git a/go.sum b/go.sum index e0641f0d22..ad61950f89 100644 --- a/go.sum +++ b/go.sum @@ -105,39 +105,33 @@ github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WN github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.17.3/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2 v1.21.1 h1:wjHYshtPpYOZm+/mu3NhVgRRc0baM6LJZOmxPZ5Cwzs= -github.com/aws/aws-sdk-go-v2 v1.21.1/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= -github.com/aws/aws-sdk-go-v2/config v1.18.44 h1:U10NQ3OxiY0dGGozmVIENIDnCT0W432PWxk2VO8wGnY= -github.com/aws/aws-sdk-go-v2/config v1.18.44/go.mod h1:pHxnQBldd0heEdJmolLBk78D1Bf69YnKLY3LOpFImlU= -github.com/aws/aws-sdk-go-v2/credentials v1.13.42 h1:KMkjpZqcMOwtRHChVlHdNxTUUAC6NC/b58mRZDIdcRg= -github.com/aws/aws-sdk-go-v2/credentials v1.13.42/go.mod h1:7ltKclhvEB8305sBhrpls24HGxORl6qgnQqSJ314Uw8= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.12 h1:3j5lrl9kVQrJ1BU4O0z7MQ8sa+UXdiLuo4j0V+odNI8= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.12/go.mod h1:JbFpcHDBdsex1zpIKuVRorZSQiZEyc3MykNCcjgz174= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.27/go.mod h1:a1/UpzeyBBerajpnP5nGZa9mGzsBn5cOKxm6NWQsvoI= +github.com/aws/aws-sdk-go-v2/config v1.18.38 h1:CByQCELMgm2tM1lAehx3XNg0R/pfeXsYzqn0Aq2chJQ= +github.com/aws/aws-sdk-go-v2/config v1.18.38/go.mod h1:vNm9Hf5VgG2fSUWhT3zFrqN/RosGcabFMYgiSoxKFU8= +github.com/aws/aws-sdk-go-v2/credentials v1.13.36 h1:ps0cPswZjpsOk6sLwG6fdXTzrYjCplgPEyG3OUbbdqE= +github.com/aws/aws-sdk-go-v2/credentials v1.13.36/go.mod h1:sY2phUzxbygoyDtTXhqi7GjGjCQ1S5a5Rj8u3ksBxCg= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 h1:817VqVe6wvwE46xXy6YF5RywvjOX6U2zRQQ6IbQFK0s= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42/go.mod h1:oDfgXoBBmj+kXnqxDDnIDnC56QBosglKp8ftRCTxR+0= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.21/go.mod h1:+Gxn8jYn5k9ebfHEqlhrMirFjSW0v0C9fI+KN5vk2kE= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 h1:7ZApaXzWbo8slc+W5TynuUlB4z66g44h7uqa3/d/BsY= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36/go.mod h1:rwr4WnmFi3RJO0M4dxbJtgi9BPLMpVBMX1nUte5ha9U= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.44 h1:quOJOqlbSfeJTboXLjYXM1M9T52LBXqLoTPlmsKLpBo= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.44/go.mod h1:LNy+P1+1LiRcCsVYr/4zG5n8zWFL0xsvZkOybjbftm8= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 h1:pdUFDCmsKlwEwVJyq/k3xLBtS/sym3dhBMTCIEDaN40= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8/go.mod h1:EwMPL+Fu95r6yS2UQY99lRR1rDjgCbcPQpy1aQ3fuxE= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.36 h1:YXlm7LxwNlauqb2OrinWlcvtsflTzP8GaMvYfQBhoT4= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.36/go.mod h1:ou9ffqJ9hKOVZmjlC6kQ6oROAyG1M4yBKzR+9BKbDwk= -github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0 h1:tQoMg8i4nFAB70cJ4wiAYEiZRYo2P6uDmU2D6ys/igo= -github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0/go.mod h1:jQhN5f4p3PALMNlUtfb/0wGIFlV7vGtJlPDVfxfNfPY= -github.com/aws/aws-sdk-go-v2/service/sso v1.15.1 h1:ZN3bxw9OYC5D6umLw6f57rNJfGfhg1DIAAcKpzyUTOE= -github.com/aws/aws-sdk-go-v2/service/sso v1.15.1/go.mod h1:PieckvBoT5HtyB9AsJRrYZFY2Z+EyfVM/9zG6gbV8DQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.2 h1:fSCCJuT5i6ht8TqGdZc5Q5K9pz/atrf7qH4iK5C9XzU= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.2/go.mod h1:5eNtr+vNc5vVd92q7SJ+U/HszsIdhZBEyi9dkMRKsp8= -github.com/aws/aws-sdk-go-v2/service/sts v1.23.1 h1:ASNYk1ypWAxRhJjKS0jBnTUeDl7HROOpeSMu1xDA/I8= -github.com/aws/aws-sdk-go-v2/service/sts v1.23.1/go.mod h1:2cnsAhVT3mqusovc2stUSUrSBGTcX9nh8Tu6xh//2eI= -github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 h1:GPUcE/Yq7Ur8YSUk6lVkoIMWnJNO0HT18GUzCWCgCI0= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 h1:qULF+ElcvjjSEO1+z5x+TmKE9d4yTej7PfpJQPVvexY= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7/go.mod h1:1HKxVrj5wsKy/wb2v07vzTSd+YPV1sDsWxferwPK7PA= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3 h1:CAWMcMnRYCBaeMnycTwZs+0BcuepIMfyP3F0r1VfgPc= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= +github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 h1:2PylFCfKCEDv6PeSN09pC/VUiRd10wi1VfHG5FrW0/g= +github.com/aws/aws-sdk-go-v2/service/sso v1.13.6/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5 h1:dnInJb4S0oy8aQuri1mV6ipLlnZPfnsDNB9BGO9PDNY= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 h1:CQBFElb0LS8RojMJlxRSo/HXipvTZW2S44Lt9Mk2aYQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.21.5/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= From beb3da3b7b534a257d97cf969338de2a18640a1a Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Tue, 10 Oct 2023 11:01:51 -0400 Subject: [PATCH 169/187] noop Signed-off-by: Philip Clark From 901924a95661116fa1de26f087d6a028ea007b61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 08:33:19 -0500 Subject: [PATCH 170/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.38 to 1.18.39 (#3018) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.38 to 1.18.39. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.38...config/v1.18.39) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 2de4012eff..3374fea166 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.38 + github.com/aws/aws-sdk-go-v2/config v1.18.39 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3 github.com/blang/semver v3.5.1+incompatible @@ -82,14 +82,14 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.36 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.37 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect diff --git a/go.sum b/go.sum index ad61950f89..285a4def46 100644 --- a/go.sum +++ b/go.sum @@ -105,10 +105,10 @@ github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WN github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.17.3/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.38 h1:CByQCELMgm2tM1lAehx3XNg0R/pfeXsYzqn0Aq2chJQ= -github.com/aws/aws-sdk-go-v2/config v1.18.38/go.mod h1:vNm9Hf5VgG2fSUWhT3zFrqN/RosGcabFMYgiSoxKFU8= -github.com/aws/aws-sdk-go-v2/credentials v1.13.36 h1:ps0cPswZjpsOk6sLwG6fdXTzrYjCplgPEyG3OUbbdqE= -github.com/aws/aws-sdk-go-v2/credentials v1.13.36/go.mod h1:sY2phUzxbygoyDtTXhqi7GjGjCQ1S5a5Rj8u3ksBxCg= +github.com/aws/aws-sdk-go-v2/config v1.18.39 h1:oPVyh6fuu/u4OiW4qcuQyEtk7U7uuNBmHmJSLg1AJsQ= +github.com/aws/aws-sdk-go-v2/config v1.18.39/go.mod h1:+NH/ZigdPckFpgB1TRcRuWCB/Kbbvkxc/iNAKTq5RhE= +github.com/aws/aws-sdk-go-v2/credentials v1.13.37 h1:BvEdm09+ZEh2XtN+PVHPcYwKY3wIeB6pw7vPRM4M9/U= +github.com/aws/aws-sdk-go-v2/credentials v1.13.37/go.mod h1:ACLrdkd4CLZyXOghZ8IYumQbcooAcp2jo/s2xsFH8IM= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= @@ -127,8 +127,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKi github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 h1:2PylFCfKCEDv6PeSN09pC/VUiRd10wi1VfHG5FrW0/g= github.com/aws/aws-sdk-go-v2/service/sso v1.13.6/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5 h1:dnInJb4S0oy8aQuri1mV6ipLlnZPfnsDNB9BGO9PDNY= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 h1:pSB560BbVj9ZlJZF4WYj5zsytWHWKxg+NgyGV4B2L58= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 h1:CQBFElb0LS8RojMJlxRSo/HXipvTZW2S44Lt9Mk2aYQ= github.com/aws/aws-sdk-go-v2/service/sts v1.21.5/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= From 83f8da07d82815b04b3364bd48074bb573c56b61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Sep 2023 12:03:56 -0500 Subject: [PATCH 171/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 from 1.21.3 to 1.21.4 (#3025) chore(deps): bump github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 Bumps [github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2](https://github.com/aws/aws-sdk-go-v2) from 1.21.3 to 1.21.4. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/efs/v1.21.3...service/efs/v1.21.4) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3374fea166..53ec9b0e1f 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.21.0 github.com/aws/aws-sdk-go-v2/config v1.18.39 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 - github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3 + github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible github.com/bombsimon/logrusr/v4 v4.0.0 github.com/evanphx/json-patch/v5 v5.7.0 diff --git a/go.sum b/go.sum index 285a4def46..f1e9b94146 100644 --- a/go.sum +++ b/go.sum @@ -121,8 +121,8 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 h1:GPUcE/Yq7Ur8YSUk6lVkoIMWnJN github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 h1:qULF+ElcvjjSEO1+z5x+TmKE9d4yTej7PfpJQPVvexY= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7/go.mod h1:1HKxVrj5wsKy/wb2v07vzTSd+YPV1sDsWxferwPK7PA= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3 h1:CAWMcMnRYCBaeMnycTwZs+0BcuepIMfyP3F0r1VfgPc= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 h1:2PylFCfKCEDv6PeSN09pC/VUiRd10wi1VfHG5FrW0/g= From bd927235f9807888d84487e090fc64e40135a7e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Sep 2023 21:01:10 -0500 Subject: [PATCH 172/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.39 to 1.18.41 (#3047) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.39 to 1.18.41. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.39...config/v1.18.41) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 53ec9b0e1f..7b6137f29f 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.39 + github.com/aws/aws-sdk-go-v2/config v1.18.41 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,15 +82,15 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.37 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.39 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect diff --git a/go.sum b/go.sum index f1e9b94146..994b590163 100644 --- a/go.sum +++ b/go.sum @@ -105,10 +105,10 @@ github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WN github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.17.3/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.39 h1:oPVyh6fuu/u4OiW4qcuQyEtk7U7uuNBmHmJSLg1AJsQ= -github.com/aws/aws-sdk-go-v2/config v1.18.39/go.mod h1:+NH/ZigdPckFpgB1TRcRuWCB/Kbbvkxc/iNAKTq5RhE= -github.com/aws/aws-sdk-go-v2/credentials v1.13.37 h1:BvEdm09+ZEh2XtN+PVHPcYwKY3wIeB6pw7vPRM4M9/U= -github.com/aws/aws-sdk-go-v2/credentials v1.13.37/go.mod h1:ACLrdkd4CLZyXOghZ8IYumQbcooAcp2jo/s2xsFH8IM= +github.com/aws/aws-sdk-go-v2/config v1.18.41 h1:Go7z97YDsBJVNAaL7pDPKB6LeHEsAkHmFe+CeK30fUQ= +github.com/aws/aws-sdk-go-v2/config v1.18.41/go.mod h1:+yR45+A0LIMKT8bWOKo90Hy9rSrovEmEKoPKLmmVec8= +github.com/aws/aws-sdk-go-v2/credentials v1.13.39 h1:UnwBXDIHKDaejSXaRzKR57IdGCizk+z1DEhnsFpus7Q= +github.com/aws/aws-sdk-go-v2/credentials v1.13.39/go.mod h1:OJ9P239A90TnglJEF3qofKiNeEM6PCV/m+aNGV5WC24= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= @@ -125,12 +125,12 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeo github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 h1:2PylFCfKCEDv6PeSN09pC/VUiRd10wi1VfHG5FrW0/g= -github.com/aws/aws-sdk-go-v2/service/sso v1.13.6/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 h1:pSB560BbVj9ZlJZF4WYj5zsytWHWKxg+NgyGV4B2L58= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= -github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 h1:CQBFElb0LS8RojMJlxRSo/HXipvTZW2S44Lt9Mk2aYQ= -github.com/aws/aws-sdk-go-v2/service/sts v1.21.5/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 h1:AR/hlTsCyk1CwlyKnPFvIMvnONydRjDDRT9OGb0i+/g= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 h1:UniOmlPJelksyP5dGjfRoFTmLDy4/o0HH1lK2Op7zC8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk= +github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= From facd8f6e0c0ce31181b0b4f007e2dd523123c2a2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 07:42:45 -0500 Subject: [PATCH 173/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.41 to 1.18.42 (#3055) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.41 to 1.18.42. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.41...config/v1.18.42) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 7b6137f29f..a763ba9820 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.41 + github.com/aws/aws-sdk-go-v2/config v1.18.42 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,14 +82,14 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.39 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.40 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect diff --git a/go.sum b/go.sum index 994b590163..27ca3841fb 100644 --- a/go.sum +++ b/go.sum @@ -105,10 +105,10 @@ github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WN github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.17.3/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.41 h1:Go7z97YDsBJVNAaL7pDPKB6LeHEsAkHmFe+CeK30fUQ= -github.com/aws/aws-sdk-go-v2/config v1.18.41/go.mod h1:+yR45+A0LIMKT8bWOKo90Hy9rSrovEmEKoPKLmmVec8= -github.com/aws/aws-sdk-go-v2/credentials v1.13.39 h1:UnwBXDIHKDaejSXaRzKR57IdGCizk+z1DEhnsFpus7Q= -github.com/aws/aws-sdk-go-v2/credentials v1.13.39/go.mod h1:OJ9P239A90TnglJEF3qofKiNeEM6PCV/m+aNGV5WC24= +github.com/aws/aws-sdk-go-v2/config v1.18.42 h1:28jHROB27xZwU0CB88giDSjz7M1Sba3olb5JBGwina8= +github.com/aws/aws-sdk-go-v2/config v1.18.42/go.mod h1:4AZM3nMMxwlG+eZlxvBKqwVbkDLlnN2a4UGTL6HjaZI= +github.com/aws/aws-sdk-go-v2/credentials v1.13.40 h1:s8yOkDh+5b1jUDhMBtngF6zKWLDs84chUk2Vk0c38Og= +github.com/aws/aws-sdk-go-v2/credentials v1.13.40/go.mod h1:VtEHVAAqDWASwdOqj/1huyT6uHbs5s8FUHfDQdky/Rs= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= @@ -117,18 +117,18 @@ github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 h1:817VqVe6wvwE46xXy github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42/go.mod h1:oDfgXoBBmj+kXnqxDDnIDnC56QBosglKp8ftRCTxR+0= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.21/go.mod h1:+Gxn8jYn5k9ebfHEqlhrMirFjSW0v0C9fI+KN5vk2kE= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 h1:GPUcE/Yq7Ur8YSUk6lVkoIMWnJNO0HT18GUzCWCgCI0= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 h1:qULF+ElcvjjSEO1+z5x+TmKE9d4yTej7PfpJQPVvexY= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7/go.mod h1:1HKxVrj5wsKy/wb2v07vzTSd+YPV1sDsWxferwPK7PA= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.0 h1:AR/hlTsCyk1CwlyKnPFvIMvnONydRjDDRT9OGb0i+/g= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0 h1:UniOmlPJelksyP5dGjfRoFTmLDy4/o0HH1lK2Op7zC8= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.0/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 h1:YkNzx1RLS0F5qdf9v1Q8Cuv9NXCL2TkosOxhzlUPV64= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.1/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk= github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= From 7c2fd824ff513ffbf67b72ef648180c69cdf4ca6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 08:14:24 -0500 Subject: [PATCH 174/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.42 to 1.18.43 (#3072) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.42 to 1.18.43. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.42...config/v1.18.43) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index a763ba9820..79ee113eaf 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.42 + github.com/aws/aws-sdk-go-v2/config v1.18.43 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,15 +82,15 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.40 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.41 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect diff --git a/go.sum b/go.sum index 27ca3841fb..621a066f19 100644 --- a/go.sum +++ b/go.sum @@ -105,10 +105,10 @@ github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WN github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.17.3/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.42 h1:28jHROB27xZwU0CB88giDSjz7M1Sba3olb5JBGwina8= -github.com/aws/aws-sdk-go-v2/config v1.18.42/go.mod h1:4AZM3nMMxwlG+eZlxvBKqwVbkDLlnN2a4UGTL6HjaZI= -github.com/aws/aws-sdk-go-v2/credentials v1.13.40 h1:s8yOkDh+5b1jUDhMBtngF6zKWLDs84chUk2Vk0c38Og= -github.com/aws/aws-sdk-go-v2/credentials v1.13.40/go.mod h1:VtEHVAAqDWASwdOqj/1huyT6uHbs5s8FUHfDQdky/Rs= +github.com/aws/aws-sdk-go-v2/config v1.18.43 h1:IgdUtTRvUDC6eiJBqU6vh7bHFNAEBjQ8S+qJ7zVhDOs= +github.com/aws/aws-sdk-go-v2/config v1.18.43/go.mod h1:NiFev8qlgg8MPzw3fO/EwzMZeZwlJEKGwfpjRPA9Nvw= +github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9rmEzEhbZFh9JQW/Bg= +github.com/aws/aws-sdk-go-v2/credentials v1.13.41/go.mod h1:cc3Fn7DkKbJalPtQnudHGZZ8ml9+hwtbc1CJONsYYqk= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= @@ -125,12 +125,12 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeo github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 h1:YkNzx1RLS0F5qdf9v1Q8Cuv9NXCL2TkosOxhzlUPV64= -github.com/aws/aws-sdk-go-v2/service/sso v1.14.1/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 h1:vuGK1vHNP9zx0PfOrtPumbwR2af0ATQ1Z2H6p75AgRQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= -github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk= -github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= From 5a9823852056c7667f012522e965f68865157ded Mon Sep 17 00:00:00 2001 From: "Yuan (Terry) Tang" Date: Mon, 9 Oct 2023 18:56:48 -0400 Subject: [PATCH 175/187] fix: Replace antonmedv/expr with expr-lang/expr (#3090) Signed-off-by: Yuan Tang Signed-off-by: Philip Clark --- go.mod | 1 + go.sum | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 79ee113eaf..068faf2214 100644 --- a/go.mod +++ b/go.mod @@ -204,6 +204,7 @@ require ( ) replace ( + github.com/antonmedv/expr => github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 k8s.io/api v0.0.0 => k8s.io/api v0.25.8 k8s.io/apiextensions-apiserver v0.0.0 => k8s.io/apiextensions-apiserver v0.25.8 diff --git a/go.sum b/go.sum index 621a066f19..11d3c51948 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,6 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= -github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee h1:ZYILioq4v6OIsr7uh0Pcx7JY4KpJ9qs8qbjRqM6HWMY= github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee/go.mod h1:VG9FXG0ddIVGc7NcSTRapaUjCPCYqOji//z6mmBYwCE= @@ -219,6 +217,8 @@ github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0n github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= +github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 h1:Sg2XxaymeyqqaLG34aB2mvlX+nii916/Gv1ovWc4jMc= +github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= From 3ba1e371b39654b6fc09a6c842c3073ea5a7571d Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Wed, 11 Oct 2023 07:04:30 -0600 Subject: [PATCH 176/187] fix: revert repo change to expr (#3094) revert repo change to expr Signed-off-by: zachaller Signed-off-by: Philip Clark --- go.mod | 1 - go.sum | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 068faf2214..79ee113eaf 100644 --- a/go.mod +++ b/go.mod @@ -204,7 +204,6 @@ require ( ) replace ( - github.com/antonmedv/expr => github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 k8s.io/api v0.0.0 => k8s.io/api v0.25.8 k8s.io/apiextensions-apiserver v0.0.0 => k8s.io/apiextensions-apiserver v0.25.8 diff --git a/go.sum b/go.sum index 11d3c51948..621a066f19 100644 --- a/go.sum +++ b/go.sum @@ -91,6 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= +github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee h1:ZYILioq4v6OIsr7uh0Pcx7JY4KpJ9qs8qbjRqM6HWMY= github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee/go.mod h1:VG9FXG0ddIVGc7NcSTRapaUjCPCYqOji//z6mmBYwCE= @@ -217,8 +219,6 @@ github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0n github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= -github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 h1:Sg2XxaymeyqqaLG34aB2mvlX+nii916/Gv1ovWc4jMc= -github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= From db7b89d59e55921a366997f45a5a0e37cf78fe4a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 08:28:40 -0500 Subject: [PATCH 177/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudwatch from 1.27.7 to 1.27.8 (#3086) chore(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudwatch Bumps [github.com/aws/aws-sdk-go-v2/service/cloudwatch](https://github.com/aws/aws-sdk-go-v2) from 1.27.7 to 1.27.8. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.27.7...service/s3/v1.27.8) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/cloudwatch dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 10 +++++----- go.sum | 10 ++++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 79ee113eaf..c73f0de11d 100644 --- a/go.mod +++ b/go.mod @@ -6,9 +6,9 @@ require ( github.com/antonmedv/expr v1.15.3 github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee github.com/argoproj/pkg v0.13.6 - github.com/aws/aws-sdk-go-v2 v1.21.0 + github.com/aws/aws-sdk-go-v2 v1.21.1 github.com/aws/aws-sdk-go-v2/config v1.18.43 - github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 + github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible github.com/bombsimon/logrusr/v4 v4.0.0 @@ -84,14 +84,14 @@ require ( github.com/aws/aws-sdk-go v1.44.116 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.13.41 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect - github.com/aws/smithy-go v1.14.2 // indirect + github.com/aws/smithy-go v1.15.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect diff --git a/go.sum b/go.sum index 621a066f19..d0470fa376 100644 --- a/go.sum +++ b/go.sum @@ -105,22 +105,25 @@ github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WN github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.17.3/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= +github.com/aws/aws-sdk-go-v2 v1.21.1 h1:wjHYshtPpYOZm+/mu3NhVgRRc0baM6LJZOmxPZ5Cwzs= +github.com/aws/aws-sdk-go-v2 v1.21.1/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= github.com/aws/aws-sdk-go-v2/config v1.18.43 h1:IgdUtTRvUDC6eiJBqU6vh7bHFNAEBjQ8S+qJ7zVhDOs= github.com/aws/aws-sdk-go-v2/config v1.18.43/go.mod h1:NiFev8qlgg8MPzw3fO/EwzMZeZwlJEKGwfpjRPA9Nvw= github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9rmEzEhbZFh9JQW/Bg= github.com/aws/aws-sdk-go-v2/credentials v1.13.41/go.mod h1:cc3Fn7DkKbJalPtQnudHGZZ8ml9+hwtbc1CJONsYYqk= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 h1:817VqVe6wvwE46xXy6YF5RywvjOX6U2zRQQ6IbQFK0s= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42/go.mod h1:oDfgXoBBmj+kXnqxDDnIDnC56QBosglKp8ftRCTxR+0= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.21/go.mod h1:+Gxn8jYn5k9ebfHEqlhrMirFjSW0v0C9fI+KN5vk2kE= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 h1:7ZApaXzWbo8slc+W5TynuUlB4z66g44h7uqa3/d/BsY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36/go.mod h1:rwr4WnmFi3RJO0M4dxbJtgi9BPLMpVBMX1nUte5ha9U= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 h1:qULF+ElcvjjSEO1+z5x+TmKE9d4yTej7PfpJQPVvexY= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7/go.mod h1:1HKxVrj5wsKy/wb2v07vzTSd+YPV1sDsWxferwPK7PA= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 h1:pdUFDCmsKlwEwVJyq/k3xLBtS/sym3dhBMTCIEDaN40= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8/go.mod h1:EwMPL+Fu95r6yS2UQY99lRR1rDjgCbcPQpy1aQ3fuxE= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= @@ -131,7 +134,6 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaK github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= -github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= From dc6b67382dcaa8c1157dd34760362bde459e8cd7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 08:28:59 -0500 Subject: [PATCH 178/187] chore(deps): bump github.com/aws/aws-sdk-go-v2 from 1.21.0 to 1.21.1 (#3085) Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.21.0 to 1.21.1. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.21.0...v1.21.1) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark From 0e95b331821552536ddd4d5dc5637d459a44feb7 Mon Sep 17 00:00:00 2001 From: "Yuan (Terry) Tang" Date: Mon, 9 Oct 2023 18:56:48 -0400 Subject: [PATCH 179/187] fix: Replace antonmedv/expr with expr-lang/expr (#3090) Signed-off-by: Yuan Tang Signed-off-by: Philip Clark --- go.mod | 1 + go.sum | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index c73f0de11d..acd7ccd045 100644 --- a/go.mod +++ b/go.mod @@ -204,6 +204,7 @@ require ( ) replace ( + github.com/antonmedv/expr => github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 k8s.io/api v0.0.0 => k8s.io/api v0.25.8 k8s.io/apiextensions-apiserver v0.0.0 => k8s.io/apiextensions-apiserver v0.25.8 diff --git a/go.sum b/go.sum index d0470fa376..af01528bd8 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,6 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= -github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee h1:ZYILioq4v6OIsr7uh0Pcx7JY4KpJ9qs8qbjRqM6HWMY= github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee/go.mod h1:VG9FXG0ddIVGc7NcSTRapaUjCPCYqOji//z6mmBYwCE= @@ -221,6 +219,8 @@ github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0n github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= +github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 h1:Sg2XxaymeyqqaLG34aB2mvlX+nii916/Gv1ovWc4jMc= +github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= From 201f117c15af1b022f5b9189cc550b701db44968 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Wed, 11 Oct 2023 07:04:30 -0600 Subject: [PATCH 180/187] fix: revert repo change to expr (#3094) revert repo change to expr Signed-off-by: zachaller Signed-off-by: Philip Clark --- go.mod | 1 - go.sum | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index acd7ccd045..c73f0de11d 100644 --- a/go.mod +++ b/go.mod @@ -204,7 +204,6 @@ require ( ) replace ( - github.com/antonmedv/expr => github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 k8s.io/api v0.0.0 => k8s.io/api v0.25.8 k8s.io/apiextensions-apiserver v0.0.0 => k8s.io/apiextensions-apiserver v0.25.8 diff --git a/go.sum b/go.sum index af01528bd8..d0470fa376 100644 --- a/go.sum +++ b/go.sum @@ -91,6 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= +github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee h1:ZYILioq4v6OIsr7uh0Pcx7JY4KpJ9qs8qbjRqM6HWMY= github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee/go.mod h1:VG9FXG0ddIVGc7NcSTRapaUjCPCYqOji//z6mmBYwCE= @@ -219,8 +221,6 @@ github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0n github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= -github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7 h1:Sg2XxaymeyqqaLG34aB2mvlX+nii916/Gv1ovWc4jMc= -github.com/expr-lang/expr v0.0.0-20230912141041-709c5dd55aa7/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= From 8efdf8f8a15294f59004b1335898bca9123af0f5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 08:28:59 -0500 Subject: [PATCH 181/187] chore(deps): bump github.com/aws/aws-sdk-go-v2 from 1.21.0 to 1.21.1 (#3085) Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.21.0 to 1.21.1. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.21.0...v1.21.1) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark From 3b128f5fa889f9580799e8b7136161888ddf5b81 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Wed, 11 Oct 2023 14:38:45 -0600 Subject: [PATCH 182/187] fix: bump notification-engine to fix double send on self server notifications (#3095) * bump notification-engine to fix double send on self server notifications Signed-off-by: zachaller * codegen Signed-off-by: zachaller --------- Signed-off-by: zachaller --- go.mod | 1 + go.sum | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/go.mod b/go.mod index c73f0de11d..2f15146cec 100644 --- a/go.mod +++ b/go.mod @@ -88,6 +88,7 @@ require ( github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect + github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect diff --git a/go.sum b/go.sum index d0470fa376..4a40c469e5 100644 --- a/go.sum +++ b/go.sum @@ -113,6 +113,7 @@ github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9r github.com/aws/aws-sdk-go-v2/credentials v1.13.41/go.mod h1:cc3Fn7DkKbJalPtQnudHGZZ8ml9+hwtbc1CJONsYYqk= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.27/go.mod h1:a1/UpzeyBBerajpnP5nGZa9mGzsBn5cOKxm6NWQsvoI= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 h1:817VqVe6wvwE46xXy6YF5RywvjOX6U2zRQQ6IbQFK0s= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42/go.mod h1:oDfgXoBBmj+kXnqxDDnIDnC56QBosglKp8ftRCTxR+0= @@ -128,12 +129,15 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeo github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= +github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0 h1:tQoMg8i4nFAB70cJ4wiAYEiZRYo2P6uDmU2D6ys/igo= +github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0/go.mod h1:jQhN5f4p3PALMNlUtfb/0wGIFlV7vGtJlPDVfxfNfPY= github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 h1:vuGK1vHNP9zx0PfOrtPumbwR2af0ATQ1Z2H6p75AgRQ= github.com/aws/aws-sdk-go-v2/service/sso v1.15.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= From 5d3ff343533f3b3fadc55c6f1eaa62769640a19f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 14:00:20 -0500 Subject: [PATCH 183/187] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.18.43 to 1.18.44 (#3099) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.43 to 1.18.44. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.43...config/v1.18.44) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Philip Clark --- go.mod | 16 ++++++++-------- go.sum | 32 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/go.mod b/go.mod index 2f15146cec..6d5a1d7515 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20231011160156-2d2d1a75dbee github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.1 - github.com/aws/aws-sdk-go-v2/config v1.18.43 + github.com/aws/aws-sdk-go-v2/config v1.18.44 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 github.com/blang/semver v3.5.1+incompatible @@ -82,16 +82,16 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.41 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.42 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.12 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.3.44 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.36 // indirect github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.15.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.23.1 // indirect github.com/aws/smithy-go v1.15.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect diff --git a/go.sum b/go.sum index 4a40c469e5..e0641f0d22 100644 --- a/go.sum +++ b/go.sum @@ -107,12 +107,12 @@ github.com/aws/aws-sdk-go-v2 v1.17.3/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3eP github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= github.com/aws/aws-sdk-go-v2 v1.21.1 h1:wjHYshtPpYOZm+/mu3NhVgRRc0baM6LJZOmxPZ5Cwzs= github.com/aws/aws-sdk-go-v2 v1.21.1/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= -github.com/aws/aws-sdk-go-v2/config v1.18.43 h1:IgdUtTRvUDC6eiJBqU6vh7bHFNAEBjQ8S+qJ7zVhDOs= -github.com/aws/aws-sdk-go-v2/config v1.18.43/go.mod h1:NiFev8qlgg8MPzw3fO/EwzMZeZwlJEKGwfpjRPA9Nvw= -github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9rmEzEhbZFh9JQW/Bg= -github.com/aws/aws-sdk-go-v2/credentials v1.13.41/go.mod h1:cc3Fn7DkKbJalPtQnudHGZZ8ml9+hwtbc1CJONsYYqk= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= +github.com/aws/aws-sdk-go-v2/config v1.18.44 h1:U10NQ3OxiY0dGGozmVIENIDnCT0W432PWxk2VO8wGnY= +github.com/aws/aws-sdk-go-v2/config v1.18.44/go.mod h1:pHxnQBldd0heEdJmolLBk78D1Bf69YnKLY3LOpFImlU= +github.com/aws/aws-sdk-go-v2/credentials v1.13.42 h1:KMkjpZqcMOwtRHChVlHdNxTUUAC6NC/b58mRZDIdcRg= +github.com/aws/aws-sdk-go-v2/credentials v1.13.42/go.mod h1:7ltKclhvEB8305sBhrpls24HGxORl6qgnQqSJ314Uw8= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.12 h1:3j5lrl9kVQrJ1BU4O0z7MQ8sa+UXdiLuo4j0V+odNI8= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.12/go.mod h1:JbFpcHDBdsex1zpIKuVRorZSQiZEyc3MykNCcjgz174= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.27/go.mod h1:a1/UpzeyBBerajpnP5nGZa9mGzsBn5cOKxm6NWQsvoI= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42 h1:817VqVe6wvwE46xXy6YF5RywvjOX6U2zRQQ6IbQFK0s= @@ -121,22 +121,22 @@ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.21/go.mod h1:+Gxn8jYn5k9 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36 h1:7ZApaXzWbo8slc+W5TynuUlB4z66g44h7uqa3/d/BsY= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.36/go.mod h1:rwr4WnmFi3RJO0M4dxbJtgi9BPLMpVBMX1nUte5ha9U= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.44 h1:quOJOqlbSfeJTboXLjYXM1M9T52LBXqLoTPlmsKLpBo= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.44/go.mod h1:LNy+P1+1LiRcCsVYr/4zG5n8zWFL0xsvZkOybjbftm8= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8 h1:pdUFDCmsKlwEwVJyq/k3xLBtS/sym3dhBMTCIEDaN40= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.8/go.mod h1:EwMPL+Fu95r6yS2UQY99lRR1rDjgCbcPQpy1aQ3fuxE= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.36 h1:YXlm7LxwNlauqb2OrinWlcvtsflTzP8GaMvYfQBhoT4= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.36/go.mod h1:ou9ffqJ9hKOVZmjlC6kQ6oROAyG1M4yBKzR+9BKbDwk= github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0 h1:tQoMg8i4nFAB70cJ4wiAYEiZRYo2P6uDmU2D6ys/igo= github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0/go.mod h1:jQhN5f4p3PALMNlUtfb/0wGIFlV7vGtJlPDVfxfNfPY= -github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 h1:vuGK1vHNP9zx0PfOrtPumbwR2af0ATQ1Z2H6p75AgRQ= -github.com/aws/aws-sdk-go-v2/service/sso v1.15.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= -github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak= -github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.1 h1:ZN3bxw9OYC5D6umLw6f57rNJfGfhg1DIAAcKpzyUTOE= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.1/go.mod h1:PieckvBoT5HtyB9AsJRrYZFY2Z+EyfVM/9zG6gbV8DQ= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.2 h1:fSCCJuT5i6ht8TqGdZc5Q5K9pz/atrf7qH4iK5C9XzU= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.2/go.mod h1:5eNtr+vNc5vVd92q7SJ+U/HszsIdhZBEyi9dkMRKsp8= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.1 h1:ASNYk1ypWAxRhJjKS0jBnTUeDl7HROOpeSMu1xDA/I8= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.1/go.mod h1:2cnsAhVT3mqusovc2stUSUrSBGTcX9nh8Tu6xh//2eI= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= From 3a5b5f8c9bf654100c71753ae5ebde2687179c0e Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Fri, 13 Oct 2023 09:52:51 -0400 Subject: [PATCH 184/187] reduce complexity of filters Signed-off-by: Philip Clark --- .../rollouts-home/rollouts-home.tsx | 53 ++++++++++--------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index cb2fde0a00..b81bf2d6d4 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -8,6 +8,7 @@ import {useWatchRollouts} from '../../shared/services/rollout'; import {RolloutsToolbar, defaultDisplayMode, Filters} from '../rollouts-toolbar/rollouts-toolbar'; import {RolloutsTable} from '../rollouts-table/rollouts-table'; import {RolloutsGrid} from '../rollouts-grid/rollouts-grid'; +import {RolloutRolloutInfo } from '../../../models/rollout/generated'; import './rollouts-home.scss'; export const RolloutsHome = () => { @@ -49,33 +50,33 @@ export const RolloutsHome = () => { localStorage.setItem('rolloutsFavorites', JSON.stringify(newFavorites)); }; + const isFavorite = (r: RolloutRolloutInfo) => filters.showFavorites && !favorites[r.objectMeta.name]; + + const requiresAttention = (r: RolloutRolloutInfo) => filters.showRequiresAttention && r.status !== 'Degraded' && r.status !== 'Paused' && r.message !== 'CanaryPauseStep'; + + const hasStatusFilter = (r: RolloutRolloutInfo) => Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]; + + const nameMatches = (r: RolloutRolloutInfo) => { + let nameMatches = false; + for (let term of filters.name.split(',').map((t) => t.trim())) { + if (term === '') continue; // Skip empty terms + if (term.startsWith('!')) { + if (!r.objectMeta.name.includes(term.substring(1))) { + nameMatches = true; + break; + } + } else if (r.objectMeta.name.includes(term)) { + nameMatches = true; + break; + } + } + return filters.name === '' || nameMatches; + }; + const filteredRollouts = React.useMemo(() => { - return rollouts.filter((r) => { - if (filters.showFavorites && !favorites[r.objectMeta.name]) { - return false; - } - if (filters.showRequiresAttention && r.status !== 'Degraded' && r.status !== 'Paused' && r.message !== 'CanaryPauseStep') { - return false; - } - if (Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]) { - return false; - } - let nameMatches = false; - for (let term of filters.name.split(',').map((t) => t.trim())) { - if (term === '') continue; // Skip empty terms - if (term.startsWith('!')) { - if (!r.objectMeta.name.includes(term.substring(1))) { - nameMatches = true; - break; - } - } else if (r.objectMeta.name.includes(term)) { - nameMatches = true; - break; - } - } - if (filters.name != '' && !nameMatches) return false; - return true; - }); + return rollouts.filter((r) => { + return isFavorite(r) || requiresAttention(r) || hasStatusFilter(r) || nameMatches(r); + }); }, [rollouts, filters, favorites]); return ( From 8e7e864fb9441f2dd3ed6752ddd3daa4d4e4c654 Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Fri, 13 Oct 2023 10:51:46 -0400 Subject: [PATCH 185/187] filters logic working Signed-off-by: Philip Clark --- .../rollouts-home/rollouts-home.tsx | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index b81bf2d6d4..4329c6b952 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -50,11 +50,17 @@ export const RolloutsHome = () => { localStorage.setItem('rolloutsFavorites', JSON.stringify(newFavorites)); }; - const isFavorite = (r: RolloutRolloutInfo) => filters.showFavorites && !favorites[r.objectMeta.name]; + const isFavorite = (r: RolloutRolloutInfo) => { + return filters.showFavorites && favorites[r.objectMeta.name]; + } - const requiresAttention = (r: RolloutRolloutInfo) => filters.showRequiresAttention && r.status !== 'Degraded' && r.status !== 'Paused' && r.message !== 'CanaryPauseStep'; + const requiresAttention = (r: RolloutRolloutInfo) => { + return filters.showRequiresAttention && (r.status === 'Degraded' || (r.status === 'Paused' && r.message !== 'CanaryPauseStep')); + } - const hasStatusFilter = (r: RolloutRolloutInfo) => Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]; + const hasStatusFilter = (r: RolloutRolloutInfo) => { + return filters.status[r.status]; + } const nameMatches = (r: RolloutRolloutInfo) => { let nameMatches = false; @@ -74,9 +80,14 @@ export const RolloutsHome = () => { }; const filteredRollouts = React.useMemo(() => { - return rollouts.filter((r) => { - return isFavorite(r) || requiresAttention(r) || hasStatusFilter(r) || nameMatches(r); - }); + return rollouts.filter((r) => { + // Only include the status filter if one of them is enabled + if (Object.values(filters.status).some((v: boolean) => v === true)) { + return isFavorite(r) || requiresAttention(r) || nameMatches(r) || hasStatusFilter(r); + } else { + return isFavorite(r) || requiresAttention(r) || nameMatches(r); + } + }); }, [rollouts, filters, favorites]); return ( From 2c161f52b452048a4abcef425bfb0af360695831 Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Sat, 14 Oct 2023 21:45:50 -0400 Subject: [PATCH 186/187] fix filters Signed-off-by: Philip Clark --- .../rollouts-home/rollouts-home.tsx | 58 ++++++++----------- 1 file changed, 23 insertions(+), 35 deletions(-) diff --git a/ui/src/app/components/rollouts-home/rollouts-home.tsx b/ui/src/app/components/rollouts-home/rollouts-home.tsx index 4329c6b952..cb2fde0a00 100644 --- a/ui/src/app/components/rollouts-home/rollouts-home.tsx +++ b/ui/src/app/components/rollouts-home/rollouts-home.tsx @@ -8,7 +8,6 @@ import {useWatchRollouts} from '../../shared/services/rollout'; import {RolloutsToolbar, defaultDisplayMode, Filters} from '../rollouts-toolbar/rollouts-toolbar'; import {RolloutsTable} from '../rollouts-table/rollouts-table'; import {RolloutsGrid} from '../rollouts-grid/rollouts-grid'; -import {RolloutRolloutInfo } from '../../../models/rollout/generated'; import './rollouts-home.scss'; export const RolloutsHome = () => { @@ -50,43 +49,32 @@ export const RolloutsHome = () => { localStorage.setItem('rolloutsFavorites', JSON.stringify(newFavorites)); }; - const isFavorite = (r: RolloutRolloutInfo) => { - return filters.showFavorites && favorites[r.objectMeta.name]; - } - - const requiresAttention = (r: RolloutRolloutInfo) => { - return filters.showRequiresAttention && (r.status === 'Degraded' || (r.status === 'Paused' && r.message !== 'CanaryPauseStep')); - } - - const hasStatusFilter = (r: RolloutRolloutInfo) => { - return filters.status[r.status]; - } - - const nameMatches = (r: RolloutRolloutInfo) => { - let nameMatches = false; - for (let term of filters.name.split(',').map((t) => t.trim())) { - if (term === '') continue; // Skip empty terms - if (term.startsWith('!')) { - if (!r.objectMeta.name.includes(term.substring(1))) { - nameMatches = true; - break; - } - } else if (r.objectMeta.name.includes(term)) { - nameMatches = true; - break; - } - } - return filters.name === '' || nameMatches; - }; - const filteredRollouts = React.useMemo(() => { return rollouts.filter((r) => { - // Only include the status filter if one of them is enabled - if (Object.values(filters.status).some((v: boolean) => v === true)) { - return isFavorite(r) || requiresAttention(r) || nameMatches(r) || hasStatusFilter(r); - } else { - return isFavorite(r) || requiresAttention(r) || nameMatches(r); + if (filters.showFavorites && !favorites[r.objectMeta.name]) { + return false; + } + if (filters.showRequiresAttention && r.status !== 'Degraded' && r.status !== 'Paused' && r.message !== 'CanaryPauseStep') { + return false; + } + if (Object.values(filters.status).some((value) => value === true) && !filters.status[r.status]) { + return false; + } + let nameMatches = false; + for (let term of filters.name.split(',').map((t) => t.trim())) { + if (term === '') continue; // Skip empty terms + if (term.startsWith('!')) { + if (!r.objectMeta.name.includes(term.substring(1))) { + nameMatches = true; + break; + } + } else if (r.objectMeta.name.includes(term)) { + nameMatches = true; + break; + } } + if (filters.name != '' && !nameMatches) return false; + return true; }); }, [rollouts, filters, favorites]); From e4b8d796edd22482e0d5b741ecd5fed7e7e0bbb6 Mon Sep 17 00:00:00 2001 From: Philip Clark Date: Mon, 16 Oct 2023 16:39:10 -0400 Subject: [PATCH 187/187] fix url Signed-off-by: Philip Clark --- ui/src/app/components/rollouts-table/rollouts-table.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/src/app/components/rollouts-table/rollouts-table.tsx b/ui/src/app/components/rollouts-table/rollouts-table.tsx index 151e96553f..7056603621 100644 --- a/ui/src/app/components/rollouts-table/rollouts-table.tsx +++ b/ui/src/app/components/rollouts-table/rollouts-table.tsx @@ -13,7 +13,6 @@ import {RolloutInfo} from '../../../models/rollout/rollout'; import {InfoItemKind, InfoItemRow} from '../info-item/info-item'; import './rollouts-table.scss'; -//({rollouts}:{rollouts: RolloutInfo[]}) => { export const RolloutsTable = ({ rollouts, onFavoriteChange, @@ -214,7 +213,7 @@ export const RolloutsTable = ({ rowClassName='rollouts-table__row' onRow={(record: RolloutInfo) => ({ onClick: () => { - window.location.href = `/rollout/${record.objectMeta?.name}`; + window.location.href = `/rollouts/rollout/${record.objectMeta?.name}`; }, style: {cursor: 'pointer'}, })}