Skip to content

OPRUN-2913: Sync 2023 07 11 #507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 93 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
cfefadd
Update sync script
tmshort Jun 29, 2023
c68c3d9
Interleave sync
tmshort Jul 11, 2023
56a947f
fix(openshift): use env var instead of clusterversion status (#2817)
tylerslaton Aug 2, 2022
fac2528
deprecate io/ioutil for io or os (#2835)
grokspawn Aug 9, 2022
fef4aa6
add grokspawn to OWNERS (#2833)
grokspawn Aug 9, 2022
0462cea
Fixes doc error: namespace name must have changed (#2839)
bentito Aug 18, 2022
e304a54
opm serve: use pre-existing cache, if set and up-to-date (#1005)
joelanford Aug 19, 2022
940a989
Fix a panic when reading annotations if the bundle is not there (#255)
bcrochet Aug 23, 2022
f785d54
introduce spec.runAsRoot field (#258)
grokspawn Aug 26, 2022
126b571
chore: update o-f/api dependency to v0.17 (#2848)
tylerslaton Aug 31, 2022
17d809e
Revert "chore: update o-f/api dependency to v0.17 (#2848)" (#2858)
anik120 Sep 13, 2022
77a49f5
bump k8s to 1.25 and go to 1.19 (#260)
laxmikantbpandhare Sep 15, 2022
349e714
Updating workflows to pull go version from go.mod file (#1025)
grokspawn Sep 23, 2022
b7c29fd
bump k8s to 1.25 (#1024)
asmacdo Sep 26, 2022
83ead8a
Makefile: Remove the -v go mod tidy flag to fix the verify check (#262)
timflannagan Sep 29, 2022
a228653
go.*,pkg: Remove the duplicate github.com/blang/semver dependency (#264)
timflannagan Sep 29, 2022
34f17ae
crds,Makefile: Bump controller-tools version to v0.9.0 (#263)
timflannagan Sep 29, 2022
a28e59e
(makefile) Upgrade mikefarah/yq to v4 (#267)
anik120 Oct 6, 2022
91929cb
(makefile) Dynamically set GOARCH flag while building binaries (#2871)
anik120 Oct 12, 2022
e31d0c7
go upgrade to 1.19 (#1029)
jcho02 Oct 19, 2022
9075694
update k8s 1.25 validation logic (#270)
everettraven Oct 28, 2022
10a3207
Update OWNERS file (#2882)
awgreene Nov 7, 2022
f7f0b2f
Allow E2E to skip multiple tests (#2892)
awgreene Nov 11, 2022
547e2ec
Revert "Allow E2E to skip multiple tests (#2892)" (#2894)
awgreene Nov 14, 2022
170b776
left-right swap edge vertices (#1041)
grokspawn Nov 15, 2022
67df4fa
semver veneer: error when unknown fields are encountered in input fil…
joelanford Nov 22, 2022
88ba32a
OWNERS: Remove timflannagan as reviewer/approver (#2899)
timflannagan Nov 30, 2022
2cc985c
adding grokspawn to tide owners file (#268)
grokspawn Nov 30, 2022
ef970ef
Bump github.com/containerd/containerd to 1.6.10 (#2903)
cblecker Dec 5, 2022
c15e987
Fix flaky unit tests (#2904)
cblecker Dec 6, 2022
8bb1991
(bugfix): make k8s 1.25 validation logic check api group before issui…
everettraven Dec 21, 2022
420a20e
Run community catalogSource in restricted mode (#2915)
awgreene Jan 12, 2023
d792bd8
opm migrate: add help text note about concatenated json format (#1055)
joelanford Jan 20, 2023
65d82e6
Don't use $BUILDPLATFORM image for goreleaser (#2896)
StopMotionCuber Jan 27, 2023
bc65828
Bump Fedora Version for Builder Image (#2921)
dtfranz Feb 9, 2023
9882e64
Bump k8s to 1.26
rashmigottipati Feb 23, 2023
e583f70
build(deps): bump golang.org/x/text from 0.3.7 to 0.3.8
dependabot[bot] Feb 23, 2023
5da057a
Bump golang.org/x/text from 0.3.7 to 0.3.8 (#2926)
dependabot[bot] Feb 28, 2023
2421bce
Bump golang.org/x/net from 0.0.0-20220909164309-bea034e7d591 to 0.7.0…
dependabot[bot] Feb 28, 2023
753b99d
Bump github.com/containerd/containerd from 1.6.10 to 1.6.18 (#2922)
dependabot[bot] Feb 28, 2023
c741efe
Bump helm.sh/helm/v3 from 3.9.0 to 3.10.3 (#2930)
perdasilva Feb 28, 2023
8171c2e
Bump k8s dependencies to 1.26.1 (#1072)
rashmigottipati Mar 3, 2023
9be81fd
bump golang.org/x/net from 0.4.0 to 0.7.0 (#1064)
dependabot[bot] Mar 3, 2023
9f184b9
Remove grace period from csv deletions (#2580)
perdasilva Mar 7, 2023
42e1648
opm render: update help text to mention that output is a stream to st…
joelanford Mar 7, 2023
4e8b89e
Makes golangci-lint use Go version from go.mod (#2935)
m1kola Mar 8, 2023
a987aa6
Add QMEU to goreleaser GitHub Action (#2936)
awgreene Mar 14, 2023
db8eddc
Add affinity customization to catalog source grpc pods
Jamstah Mar 5, 2023
5cfad02
Helm upgrade to v3.11.1 for CVE-2023-25165 (#2933)
tmshort Mar 14, 2023
a56edf4
Registry Pod Controller Flag (#2928)
dtfranz Mar 15, 2023
3fff3ca
Updates `syncResolvingNamespace` tests
Mar 24, 2023
6e6eecc
Add Support for Fetching Remote Catalog (#1079)
Mar 28, 2023
05a8eb0
Improve ClusterServiceVersion schema. (#168)
TheRealJon Mar 28, 2023
844228e
Package sort for deterministic ordering in ListBundles API (#1084)
grokspawn Apr 3, 2023
b309c03
build(deps): bump github.com/containerd/containerd from 1.5.13 to 1.5…
dependabot[bot] Apr 6, 2023
ab4cedb
take image domain name from env (#791)
akihikokuroda Apr 6, 2023
5c7596a
Update multi-arch validator to check node affinity for multi-platform…
jaypoulz Apr 10, 2023
2fb797b
Fixes echo of the current cluster name
Mar 8, 2023
b7c43b6
Bump github.com/docker/docker (#2948)
dependabot[bot] Apr 12, 2023
0923b4a
Remove extra jobLabel (#2951)
perdasilva Apr 12, 2023
b5497ce
Fixes godoc rendering (#2937)
m1kola Apr 12, 2023
1eb9db7
Change opm image from `quay.io/operator-framework/upstream-opm-builde…
StopMotionCuber Apr 13, 2023
35328fa
New condition types (#282)
m1kola Apr 13, 2023
791f74c
Fix example string for svg icon types (#2953)
perdasilva Apr 14, 2023
aae584a
Workaround server-side apply not working (#2911)
sathieu Apr 14, 2023
b174273
Remove vendor dir (#1085)
dtfranz Apr 20, 2023
ac08f8c
GitHub Actions Updates (#2956)
dtfranz Apr 24, 2023
476818c
Add linux node selector to bundleUnpacker job (#2685)
aimichelle Apr 24, 2023
da4f33a
Moves bundle unpack timeout into OperatorGroup (#2952)
m1kola Apr 24, 2023
917ca29
Restores openapi-gen tag for APIResourceReference (#283)
m1kola Apr 25, 2023
4f191e9
refactor to move more processing to the API (#1082)
grokspawn Apr 25, 2023
b9bad2b
Updates github.com/operator-framework/api (#2954)
m1kola Apr 26, 2023
6c897a3
comment out CatalogDestination.BaseImage while we mature the concept …
grokspawn Apr 26, 2023
c34c96f
Add WalkMetas* functions and meta.Name field (#1089)
joelanford May 5, 2023
6f720be
resolve channel collisions by a preferred channel type, where they ar…
grokspawn May 22, 2023
29c61cb
Bump github.com/docker/distribution (#2966)
dependabot[bot] May 22, 2023
69985eb
Cleans up the TODO related to `BundleLookupFailed` (#2959)
m1kola May 22, 2023
8447fa9
Prevent OLM from creating `InstallPlan`s when bundle unpack fails (#2…
m1kola May 26, 2023
4bf1390
render: improve olm.bundle.object rendering for bundles (#1094)
joelanford Jun 6, 2023
430ded0
bump golang-migrate to v4.16.1 (#1107)
grokspawn Jun 6, 2023
4c23943
declcfg/load: improvements (#1106)
stevekuznetsov Jun 6, 2023
4c54469
re-introduce and fix declcfg.Meta unmarshal error (#1109)
joelanford Jun 9, 2023
6fff221
Removes error silencing from IsFailForwardEnabled (#2957)
m1kola Jun 12, 2023
3215287
updating dependencies (#284)
acornett21 Jun 26, 2023
db26209
Updates GH Actions to avoid using deprecated node (#1117)
m1kola Jun 26, 2023
422f240
Switches to codecov GH action (#1118)
m1kola Jun 27, 2023
3dacfad
Bump k8s.io/client-go from v0.26.1 to v0.27.1 (#1119)
OchiengEd Jun 27, 2023
8498a12
Correct spelling typo in CSVAnormalOver30Min alert desc (#2972)
mrbarge Jun 28, 2023
eeebf9e
Adds codecov integration (#285)
m1kola Jun 29, 2023
e135bce
Avoid making the termination log executable (#1110)
ramikg Jun 30, 2023
0e8b278
Retry initialization error conditions (#2979)
tmshort Jul 5, 2023
cc1932d
OWNERS: Remove timflannagan as a reviewer (#1123)
timflannagan Jul 6, 2023
29aaf15
Catalog source affinity (#2963)
Jamstah Jul 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
254 changes: 114 additions & 140 deletions go.mod

Large diffs are not rendered by default.

714 changes: 272 additions & 442 deletions go.sum

Large diffs are not rendered by default.

464 changes: 464 additions & 0 deletions manifests/0000_50_olm_00-catalogsources.crd.yaml

Large diffs are not rendered by default.

259 changes: 218 additions & 41 deletions manifests/0000_50_olm_00-clusterserviceversions.crd.yaml

Large diffs are not rendered by default.

43 changes: 38 additions & 5 deletions manifests/0000_50_olm_00-subscriptions.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,21 @@ spec:
description: 'Resources represents compute resources required by this container. Immutable. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
properties:
claims:
description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. \n This field is immutable. It can only be set for containers."
type: array
items:
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
type: object
required:
- name
properties:
name:
description: Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
type: string
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
limits:
description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
Expand All @@ -655,7 +670,7 @@ spec:
- type: string
x-kubernetes-int-or-string: true
requests:
description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
additionalProperties:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
Expand Down Expand Up @@ -989,7 +1004,7 @@ spec:
description: 'medium represents what type of storage medium should back this directory. The default is "" which means to use the node''s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
type: string
sizeLimit:
description: 'sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir'
description: 'sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
anyOf:
- type: integer
Expand Down Expand Up @@ -1018,7 +1033,7 @@ spec:
items:
type: string
dataSource:
description: 'dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.'
description: 'dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource.'
type: object
required:
- kind
Expand All @@ -1034,7 +1049,7 @@ spec:
description: Name is the name of resource being referenced
type: string
dataSourceRef:
description: 'dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.'
description: 'dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn''t specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn''t set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.'
type: object
required:
- kind
Expand All @@ -1049,10 +1064,28 @@ spec:
name:
description: Name is the name of resource being referenced
type: string
namespace:
description: Namespace is the namespace of resource being referenced Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
type: string
resources:
description: 'resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
type: object
properties:
claims:
description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. \n This field is immutable. It can only be set for containers."
type: array
items:
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
type: object
required:
- name
properties:
name:
description: Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
type: string
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
limits:
description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
Expand All @@ -1063,7 +1096,7 @@ spec:
- type: string
x-kubernetes-int-or-string: true
requests:
description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
additionalProperties:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
Expand Down
1 change: 0 additions & 1 deletion manifests/0000_90_olm_00-service-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ metadata:
include.release.openshift.io/ibm-cloud-managed: "true"
include.release.openshift.io/self-managed-high-availability: "true"
spec:
jobLabel: k8s-app
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
interval: 30s
Expand Down
4 changes: 2 additions & 2 deletions pkg/manifests/csv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: packageserver
namespace: openshift-operator-lifecycle-manager
labels:
olm.version: 0.19.0
olm.version: 0.0.0-e17b6a389771f79426879e9feeae14d959b90e48
olm.clusteroperator.name: operator-lifecycle-manager-packageserver
annotations:
include.release.openshift.io/self-managed-high-availability: "true"
Expand Down Expand Up @@ -159,7 +159,7 @@ spec:
- packageserver
topologyKey: "kubernetes.io/hostname"
maturity: alpha
version: 0.19.0
version: 0.0.0-e17b6a389771f79426879e9feeae14d959b90e48
apiservicedefinitions:
owned:
- group: packages.operators.coreos.com
Expand Down
8 changes: 5 additions & 3 deletions scripts/sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ candidates() {
for remote in "${UPSTREAM_REMOTES[@]}"; do
"${ROOT_DIR}"/scripts/sync_get_candidates.sh "$remote"
done

# Create uber cherry-pick list
cat *.cherrypick | sort > all.cherrypick
echo "Number of commits to cherrypick: $(cat all.cherrypick | wc -l)"
}

pop() {
echo "Applying all upstream commit candidates"
for remote in "${UPSTREAM_REMOTES[@]}"; do
"${ROOT_DIR}"/scripts/sync_pop_candidate.sh -a "${remote}"
done
"${ROOT_DIR}"/scripts/sync_pop_candidate.sh -a "all"
}

check_local_branch_commit_diff() {
Expand Down
2 changes: 1 addition & 1 deletion scripts/sync_get_candidates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ cherrypick_set="${remote}.cherrypick"
: > "${cherrypick_set}" # clear existing file
for rc in "${remote_commits[@]}"; do
if [[ -z $(git log -n 1 --no-merges --grep "${rc}" HEAD) && -z $(grep "${rc}" "${remote}.blacklist") ]]; then
printf '%s\n' "${rc}" >> "${cherrypick_set}"
git show -s --format="%cI ${remote} %H" "${rc}" >> "${cherrypick_set}"
(( ++picked ))
fi
done
Expand Down
72 changes: 55 additions & 17 deletions scripts/sync_pop_candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

set -o errexit
set -o pipefail
#set -x

ROOT_DIR=$(dirname "${BASH_SOURCE[@]}")/..
# shellcheck disable=SC1091
Expand Down Expand Up @@ -30,33 +31,50 @@ function pop() {
printf 'nothing to pick'
exit
fi
readarray -t rcs < <(echo "$rc" | tr " " "\n")
remote="${rcs[1]}"
subtree_dir="staging/${remote}"
rc="${rcs[2]}"
printf 'popping: %s\n' "${rc}"

if ! git cherry-pick --allow-empty --keep-redundant-commits -Xsubtree="${subtree_dir}" "${rc}"; then
# Always blast away the vendor directory given OLM/registry still commit it into source control.
git rm -rf "${subtree_dir}"/vendor 2>/dev/null || true

# Look for any deleted by us
readarray -t deletes < <(git status --porcelain| grep -oP "^DU \K.*")
for d in "${deletes[@]}"; do
git rm "${d}"
done
echo "Done with deletes"

# Handle other conflicts
num_conflicts=$(git diff --name-only --diff-filter=U --relative | wc -l)
while [[ $num_conflicts != 0 ]] ; do
file=$(git diff --name-only --diff-filter=U --relative)

if [[ $file == *"go.mod"* ]]; then
git diff "${subtree_dir}"/go.mod

git checkout --theirs "${subtree_dir}"/go.mod
pushd "${subtree_dir}"
go mod tidy
git add go.mod go.sum
popd
else
git checkout --theirs "$file"
git diff "$file"
git add "$file"
fi
readarray -t files < <(git diff --name-only --diff-filter=U --relative)

for f in "${files[@]}"; do

# Note that this can be a problem if there are regressions! (e.g. 1.2 -> 1.1)
if [[ ${f} == *"go.mod"* ]]; then
git diff "${subtree_dir}"/go.mod

git checkout --theirs "${subtree_dir}"/go.mod
pushd "${subtree_dir}"
go mod tidy
git add go.mod go.sum
popd
else
git checkout --theirs "${f}"
git diff "${f}"
git add "${f}"
fi
done

num_conflicts=$(git diff --name-only --diff-filter=U --relative | wc -l)
echo "Number of merge conflicts remaining: $num_conflicts"
done
echo "Done with conflicts"

if [[ -z $(git status --porcelain) ]]; then
git commit --allow-empty
Expand All @@ -66,16 +84,36 @@ function pop() {
fi
fi

# Did go.mod change?
if ! git diff --quiet HEAD^ "${subtree_dir}"/go.mod; then
git diff HEAD^ "${subtree_dir}"/go.mod
pushd "${subtree_dir}"
echo "Running BASH subshell: go.mod has changed, check for regressions!"
echo -n '<ENTER> to continue, ^C to quit: '
read
popd
fi

# 1. Pop next commit off cherrypick set
# 2. Cherry-pick
# 3. Ammend commit
# 4. Remove from cherrypick set
make vendor
make manifests
if ! make vendor; then
echo "Running BASH subshell: fix make vendor"
echo -n '<ENTER> to continue, ^C to quit: '
read
fi
git add "${subtree_dir}" "${ROOT_GENERATED_PATHS[@]}"
git status
git commit --amend --allow-empty --no-edit --trailer "Upstream-repository: ${remote}" --trailer "Upstream-commit: ${rc}"
if ! make manifests; then
echo "Running BASH subshell: fix make manifests"
echo -n '<ENTER> to continue, ^C to quit: '
read
fi
git add "${subtree_dir}" "${ROOT_GENERATED_PATHS[@]}"
git status
git commit --amend --allow-empty --no-edit

tmp_set=$(mktemp)
tail -n +2 "${cherrypick_set}" > "${tmp_set}"; cat "${tmp_set}" > "${cherrypick_set}"
Expand Down
15 changes: 10 additions & 5 deletions staging/api/.github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand All @@ -29,17 +29,22 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- name: unit-test
run: go test -v ./...
run: go test -v ./... -coverprofile cover.out
- uses: codecov/codecov-action@v3
with:
files: cover.out
fail_ci_if_error: true
functionalities: fixes

go-apidiff:
name: go-apidiff
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
id: go
- name: Print out Go env
run: go env
Expand Down
Loading