Skip to content

stageTimeout changes do not reach in-flight Jobs #425

Description

@ayuskauskas

Important

Base this work on feature/package-as-jobs, not main.

The Jobs migration (#223) is integrating on that branch. main does not yet execute
packages as Jobs, so a PR opened against main will be missing the code this depends
on. feature/package-as-jobs merges to main once #305 lands.

That branch squash-merges, so if your branch is stacked on another PR in this epic,
replay only your own commits when restacking:
git rebase --onto origin/feature/package-as-jobs <last-inherited-commit>

Part of #223. Refs #411 (item 4).

Problem

jobMatchesPackage (job_builder.go:163-169) compares only the pod-template subset via podMatchesPackage. ActiveDeadlineSeconds is set separately from effectiveStageTimeout(opts, _package) and is never compared.

Editing package.stageTimeout, or the operator-wide JOB_STAGE_TIMEOUT default, therefore leaves an existing Job looking current, so validation will not replace a Job that now carries the wrong deadline. The new CRD knob has no effect on in-flight work until the Job finishes or is deleted by hand.

Note on #402

PR #402 (#373) moves the per-attempt deadline onto the pod template and adds a derived Job-level ceiling, which changes where the field lives but does not add a comparison. Confirm against that PR's final shape before fixing — depending on what podMatchesPackage compares, part of this may resolve there.

Acceptance

  • Changing package.stageTimeout or JOB_STAGE_TIMEOUT causes validation to replace the in-flight Job.
  • Spec covers both the per-package field and the operator-wide default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/operatorSkyhook operator (controller-manager)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions