Skip to content

Commit f044fd3

Browse files
committed
Fix CI regressions after upstream sync
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
1 parent 4273173 commit f044fd3

3 files changed

Lines changed: 13 additions & 7 deletions

File tree

‎charts/substrate/templates/sandboxconfig-gvisor.yaml‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,15 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/}}
1616

17-
# Cluster-wide default SandboxConfig for the gVisor (runsc) sandbox class. A
18-
# WorkerPool with sandboxClass gvisor (the default) and no explicit
19-
# sandboxConfigName resolves to this. atelet fetches the runsc binary matching
20-
# the worker node's architecture. To pin a different runsc, edit the assets
21-
# below or create another SandboxConfig and name it from the WorkerPool.
17+
# Cluster-wide SandboxConfig for the gVisor (runsc) sandbox class, shipped with
18+
# the platform so gVisor ActorTemplates have a config to name via
19+
# sandboxConfig.configName.
2220
apiVersion: ate.dev/v1alpha1
2321
kind: SandboxConfig
2422
metadata:
2523
name: gvisor-default
2624
spec:
2725
sandboxClass: gvisor
28-
default: true
2926
pauseImage: "registry.k8s.io/pause:3.10.2@sha256:f548e0e8e3dc1896ca956272154dde3314e8cc4fde0a57577ee9fa1c63f5baf4"
3027
assets:
3128
amd64:

‎cmd/ateapi/internal/controlapi/workflow_pause.go‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,16 @@ func (w *ActorWorkflow) ensurePausedFinalized(ctx context.Context, actorRef reso
237237
nodeName = worker.GetNodeName()
238238
// Drop just this actor's assignment; any other actors the worker
239239
// hosts keep theirs.
240-
_, err := w.store.ReleaseActorFromWorker(ctx, worker.GetMetadata().GetName(), latestActor.GetMetadata().GetUid())
240+
released, err := w.store.ReleaseActorFromWorker(ctx, worker.GetMetadata().GetName(), latestActor.GetMetadata().GetUid())
241241
if err != nil {
242242
if errors.Is(err, store.ErrVersionConflict) {
243243
return nil, status.Error(codes.Aborted, "concurrent update conflict, please retry")
244244
}
245245
return nil, err
246246
}
247+
if w.workerCache != nil {
248+
w.workerCache.Observe(released)
249+
}
247250
}
248251

249252
// 2. Clear the actor's assignment, now that the worker is freed

‎cmd/ateapi/internal/workercache/workercache.go‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ func (c *Cache) Forget(name string) {
120120
delete(c.workers, name)
121121
}
122122

123+
// Observe applies a worker returned by a successful store write immediately,
124+
// without waiting for the corresponding watch event.
125+
func (c *Cache) Observe(worker *ateapipb.Worker) {
126+
c.applyEvent(store.WorkerEvent{Type: store.WorkerEventUpdated, Worker: worker})
127+
}
128+
123129
func (c *Cache) sync(ctx context.Context) (*store.WorkerWatch, error) {
124130
watch, err := c.store.WatchWorkers(ctx)
125131
if err != nil {

0 commit comments

Comments
 (0)