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

🐛 [backplane-2.5] Check if the token has expired (#116) #136

Conversation

openshift-cherrypick-robot
Copy link

@openshift-cherrypick-robot openshift-cherrypick-robot commented Sep 13, 2024

This is an automated cherry-pick of #135

/assign zhujian7

Fix https://issues.redhat.com/browse/ACM-14286

* Check if the token has expired periodically

Signed-off-by: zhujian <[email protected]>

* Requeue before the token is about to expire

Signed-off-by: zhujian <[email protected]>

* Add unit tests

Signed-off-by: zhujian <[email protected]>

---------

Signed-off-by: zhujian <[email protected]>
@zhujian7 zhujian7 changed the title [backplane-2.5] 🐛 Check if the token has expired (#116) 🐛 [backplane-2.5] Check if the token has expired (#116) Sep 13, 2024
@zhujian7
Copy link

@xuezhaojun

Copy link

sonarcloud bot commented Sep 13, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
57.1% Coverage on New Code (required ≥ 70%)

See analysis details on SonarCloud

@zhujian7
Copy link

/override ci/prow/sonarcloud

Copy link

openshift-ci bot commented Sep 13, 2024

@zhujian7: Overrode contexts on behalf of zhujian7: ci/prow/sonarcloud

In response to this:

/override ci/prow/sonarcloud

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@zhujian7
Copy link

Some less important code(some are comments) is not covered:

Uncovered code
New code
	return reconcile.Result{
		// Requeue even if the token is not refreshed, otherwise if the agent restarts
		// at the time that the token is not expried, no chance to trigger the expiration
		// check again
		RequeueAfter: checkTokenRefreshAfter(now, expiring, msa.Spec.Rotation.Validity.Duration),
	}, nil

/override "SonarCloud Code Analysis"

Copy link

openshift-ci bot commented Sep 13, 2024

@zhujian7: Overrode contexts on behalf of zhujian7: SonarCloud Code Analysis

In response to this:

Some less important code(some are comments) is not covered:

Uncovered code
New code
  return reconcile.Result{
  	// Requeue even if the token is not refreshed, otherwise if the agent restarts
  	// at the time that the token is not expried, no chance to trigger the expiration
  	// check again
  	RequeueAfter: checkTokenRefreshAfter(now, expiring, msa.Spec.Rotation.Validity.Duration),
  }, nil

/override "SonarCloud Code Analysis"

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@xuezhaojun
Copy link

/lgtm

I think we can just merge it manually.

@zhujian7
Copy link

/hold
/approve

Copy link

openshift-ci bot commented Sep 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: openshift-cherrypick-robot, xuezhaojun, zhujian7

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@zhujian7
Copy link

/unhold

@zhujian7
Copy link

/test sonarcloud

Copy link

sonarcloud bot commented Oct 21, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
57.1% Coverage on New Code (required ≥ 70%)

See analysis details on SonarCloud

@zhujian7
Copy link

/override "ci/prow/sonarcloud"

Copy link

openshift-ci bot commented Oct 21, 2024

@zhujian7: Overrode contexts on behalf of zhujian7: ci/prow/sonarcloud

In response to this:

/override "ci/prow/sonarcloud"

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-merge-bot openshift-merge-bot bot merged commit 8dfbf99 into stolostron:backplane-2.5 Oct 21, 2024
14 of 15 checks passed
zhujian7 added a commit that referenced this pull request Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants