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

Add "Deprecated" annotation to Pending #5224

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/apis/crd/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
type TraceflowPhase string

const (
// Pending is not used anymore
// Deprecated: Pending is not used anymore
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it's reasonable to refine comment for IDE behavior since different IDEs may have different requirements. @antoninbas @tnqn any comments?

Copy link
Contributor

@luolanzone luolanzone Jul 10, 2023

Choose a reason for hiding this comment

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

If it's necessary to show deprecated info, I may include the change in PR #5108.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

This looks fine to me.
@luolanzone we can merge this PR as is, and you can remove Pending altogether for v1beta1/types.go in your PR

Pending TraceflowPhase = "Pending"
Running TraceflowPhase = "Running"
Succeeded TraceflowPhase = "Succeeded"
Expand Down
2 changes: 2 additions & 0 deletions pkg/controller/traceflow/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ func (c *Controller) syncTraceflow(traceflowName string) error {
return err
}
switch tf.Status.Phase {
//lint:ignore SA1019 Allow existing use.
//nolint:staticcheck
case "", crdv1alpha1.Pending:
err = c.startTraceflow(tf)
case crdv1alpha1.Running:
Expand Down