Skip to content

Conversation

csviri
Copy link
Collaborator

@csviri csviri commented Jan 12, 2022

Few sonar reported issue fixes

import io.javaoperatorsdk.operator.processing.LifecycleAware;

@SuppressWarnings("rawtypes")
public class Operator implements AutoCloseable, LifecycleAware {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@metacosm this Autoclosable is a little bit confusing here since start is not blocking, removed it, pls let me know what do you think.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That change will need to be documented because people might be relying on it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You mean in migration guide? We don't document changes from v1 -> v2 , just there

@csviri csviri self-assigned this Jan 12, 2022
@csviri csviri force-pushed the sonar-reported-issues branch from c9f32bf to fb39bbc Compare January 12, 2022 13:14
@csviri csviri marked this pull request as ready for review January 12, 2022 13:16
private final GenericRetry genericRetry;

private volatile int lastAttemptIndex = 0;
private AtomicInteger lastAttemptIndex = new AtomicInteger(0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we actually have multiple threads accessing that state concurrently?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

checked and atctually don't now, good catch! Changhed it

Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you push the changes, I don't see them?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

now I did :)

import io.javaoperatorsdk.operator.processing.LifecycleAware;

@SuppressWarnings("rawtypes")
public class Operator implements AutoCloseable, LifecycleAware {
Copy link
Collaborator

Choose a reason for hiding this comment

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

That change will need to be documented because people might be relying on it.

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

66.7% 66.7% Coverage
0.0% 0.0% Duplication

@metacosm
Copy link
Collaborator

Let's get this merged!

@csviri csviri merged commit d42942b into main Jan 13, 2022
@csviri csviri deleted the sonar-reported-issues branch January 13, 2022 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants