shipwright-io / operator

An operator to install and configure Shipwright Builds on Kubernetes clusters.
Apache License 2.0
19 stars 17 forks source link

Upgrade shipwright-io/build to v0.13.0 #216

Closed adambkaplan closed 3 months ago

adambkaplan commented 3 months ago

Changes

Upgrade shipwright-io/build to v0.13.0, ahead of upgrading the samples and operand deployments.

This includes respective transitive updates to k8s libraries and their dependencies. As part of the upgrade, a previously identified flaky/brittle test started failing permanently. These have been skipped for the interim.

These updates also exposed a bug in the controller code, where the controller would not re-queue when a status update failed. This has now been fixed.

/kind cleanup

Submitter Checklist

See the contributor guide for details on coding conventions, github and prow interactions, and the code review process.

Release Notes

Upgrade shipwright-io/build code dependencies to v0.13.0 and k8s.io to v0.27.11. These upgrades exposed a bug in the controller code, where failure to update the ShipwrightBuild object status would not trigger a requeue. This was fixed so status update failures cause the controller to re-reconcile.
adambkaplan commented 3 months ago

/assign @ayushsatyam146

/cc @apoorvajagtap

adambkaplan commented 3 months ago

/kind bug

:relieved: these updates actually exposed a bug in the controller code! I observed a few things that led me to think something was off in the tests:

  1. We were still deploying Shipwright v0.12 operands, so the switch from v1alpha1 to v1beta1 storage should not be an issue.
  2. The test was failing because of an API discovery error during the setup phase - the code to check if the build strategies API existed was returning early. I suspected this was happening because we had API skew between EnvTest and our k8s.io client code. Changing EnvTest to use k8s 1.27 seems to have fixed this.
  3. I separately saw in the test logs that we were getting a "conflict" error from EnvTest. This isn't totally weird for a controller - I've seen it plenty of times in other controller logs, especially if the controller is not using server-side apply. What was weird was that there was no follow-up re-queue in the test logs. This led me to a very important 1-line bug fix.

Release note has been updated to include this bug fix.

apoorvajagtap commented 3 months ago

/lgtm

adambkaplan commented 3 months ago

/approve

Self-approving. TODO - may need to review DevStats to add additional approvers.

openshift-ci[bot] commented 3 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adambkaplan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/shipwright-io/operator/blob/main/OWNERS)~~ [adambkaplan] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment