Skip to content
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

Prioritize StorageOperationFailedCondition #613

Merged
merged 1 commit into from
Mar 16, 2022
Merged

Conversation

darkowlzz
Copy link
Contributor

Prioritize StorageOperationFailedCondition over other artifact outdated
and unavailable conditions so that when the artifact is failing due to
storage operation, it's visble in the ready status condition, making the
reason for not ready more accurate.

Status conditions before:

conditions:
  - lastTransitionTime: "2022-03-14T16:22:39Z"
    message: no artifact for resource in storage
    observedGeneration: 1
    reason: NoArtifact
    status: "True"
    type: Reconciling
  - lastTransitionTime: "2022-03-14T16:22:39Z"
    message: pulled 'podinfo' chart with version '5.2.1'
    observedGeneration: 1
    reason: NewChart
    status: "False"
    type: Ready
  - lastTransitionTime: "2022-03-14T16:22:39Z"
    message: pulled 'podinfo' chart with version '5.2.1'
    observedGeneration: 1
    reason: NewChart
    status: "True"
    type: ArtifactOutdated
  - lastTransitionTime: "2022-03-14T16:22:39Z"
    message: 'failed to create artifact directory: mkdir /data/helmchart/default/podinfo:
      not a directory'
    observedGeneration: 1
    reason: DirectoryCreationFailed
    status: "True"
    type: StorageOperationFailed
  observedGeneration: -1
  observedSourceArtifactRevision: 4995e6e5e300c68f9ea8e0f26c91e42f0dbaf1be46e4e464b25988eb5ae86d4b

After:

conditions:
  - lastTransitionTime: "2022-03-14T20:40:41Z"
    message: no artifact for resource in storage
    observedGeneration: 1
    reason: NoArtifact
    status: "True"
    type: Reconciling
  - lastTransitionTime: "2022-03-14T20:40:41Z"
    message: 'failed to create artifact directory: mkdir /data/helmchart/default/podinfo:
      not a directory'
    observedGeneration: 1
    reason: DirectoryCreationFailed
    status: "False"
    type: Ready
  - lastTransitionTime: "2022-03-14T20:40:41Z"
    message: pulled 'podinfo' chart with version '5.2.1'
    observedGeneration: 1
    reason: NewChart
    status: "True"
    type: ArtifactOutdated
  - lastTransitionTime: "2022-03-14T20:40:41Z"
    message: 'failed to create artifact directory: mkdir /data/helmchart/default/podinfo:
      not a directory'
    observedGeneration: 1
    reason: DirectoryCreationFailed
    status: "True"
    type: StorageOperationFailed
  observedGeneration: -1
  observedSourceArtifactRevision: 4995e6e5e300c68f9ea8e0f26c91e42f0dbaf1be46e4e464b25988eb5ae86d4b

@darkowlzz darkowlzz added the enhancement New feature or request label Mar 14, 2022
Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for this PR to address now, but given this could be changed without making any changes to the tests, I think we have a blind spot that should be covered (filing it as an issue for the backlog is fine).

Thank you @darkowlzz 🙇

Prioritize StorageOperationFailedCondition over other artifact outdated
and unavailable conditions so that when artifact is failing due to
storage operation, it's visble in the ready status condition, making the
reason for not ready more accurate.

Signed-off-by: Sunny <[email protected]>
@darkowlzz darkowlzz merged commit e4d0b53 into main Mar 16, 2022
@darkowlzz darkowlzz deleted the reorder-conditions branch March 16, 2022 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants