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 tranposrt config secret for agent and manager #1060

Merged
merged 9 commits into from
Aug 28, 2024

Conversation

yanmxa
Copy link
Member

@yanmxa yanmxa commented Aug 19, 2024

Summary

Related issue(s)

Fixes #

References: #1045

@yanmxa
Copy link
Member Author

yanmxa commented Aug 26, 2024

/retest

@yanmxa
Copy link
Member Author

yanmxa commented Aug 26, 2024

/test test-e2e

@yanmxa
Copy link
Member Author

yanmxa commented Aug 27, 2024

/override "ci/prow/sonarcloud"

Copy link

openshift-ci bot commented Aug 27, 2024

@yanmxa: Overrode contexts on behalf of yanmxa: 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.

c.consumerCancel()
}
c.consumerCtx, c.consumerCancel = context.WithCancel(ctx)
go func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

If It's possible that mutiple request enter this go func() and start the consumer several time at the same time.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

return ctrl.Result{}, fmt.Errorf("failed to create the consumer: %w", err)
}
c.consumer = receiver
go func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Multiple request may enter this go routine and start it several times

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@yanmxa
Copy link
Member Author

yanmxa commented Aug 27, 2024

/test test-e2e

@yanmxa yanmxa force-pushed the br_update_agent_manager branch from e57aabc to 562bd22 Compare August 27, 2024 09:36
@yanmxa
Copy link
Member Author

yanmxa commented Aug 27, 2024

/override ci/prow/sonarcloud

Copy link

openshift-ci bot commented Aug 27, 2024

@yanmxa: Overrode contexts on behalf of yanmxa: 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.

@yanmxa
Copy link
Member Author

yanmxa commented Aug 27, 2024

/override "SonarCloud Code Analysis"

Copy link

openshift-ci bot commented Aug 27, 2024

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

In response to this:

/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.

@yanmxa yanmxa requested a review from ldpliu August 27, 2024 14:18
@yanmxa
Copy link
Member Author

yanmxa commented Aug 28, 2024

/cc @ldpliu @clyang82

@openshift-ci openshift-ci bot requested a review from clyang82 August 28, 2024 00:59
@ldpliu
Copy link
Contributor

ldpliu commented Aug 28, 2024

It looks good to me, @clyang82 Please help to take a look

ConsumerConfig: &transport.KafkaConsumerConfig{},
},
IsManager: false,
EnableDatabaseOffset: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

it is worth adding comments for those 2 fields.

return fmt.Errorf("failed to add transport consumer to manager: %w", err)
}

func AddToManager(mgr ctrl.Manager, consumer transport.Consumer, agentConfig *config.AgentConfig) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

var specControllerStarted bool

func AddToManager(...) {
if specControllerStarted {
return
}
specControllerStarted = true
}


if err := cronjob.AddSchedulerToManager(ctx, mgr, managerConfig, enableSimulation); err != nil {
return nil, fmt.Errorf("failed to add scheduler to manager: %w", err)
Copy link
Member Author

Choose a reason for hiding this comment

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

cronjob

yanmxa added 2 commits August 28, 2024 09:19
Signed-off-by: myan <[email protected]>

fix the integration

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

fix the integration test

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

fix the ut

Signed-off-by: myan <[email protected]>
@yanmxa yanmxa force-pushed the br_update_agent_manager branch from 562bd22 to 3a20bc0 Compare August 28, 2024 09:19
Signed-off-by: myan <[email protected]>
@yanmxa
Copy link
Member Author

yanmxa commented Aug 28, 2024

/override ci/prow/sonarcloud

Copy link

openshift-ci bot commented Aug 28, 2024

@yanmxa: Overrode contexts on behalf of yanmxa: 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.

@yanmxa
Copy link
Member Author

yanmxa commented Aug 28, 2024

/override "SonarCloud Code Analysis"

Copy link

openshift-ci bot commented Aug 28, 2024

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

In response to this:

/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.

Copy link
Contributor

@clyang82 clyang82 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

openshift-ci bot commented Aug 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: clyang82, yanmxa

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

Copy link

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarCloud

@yanmxa
Copy link
Member Author

yanmxa commented Aug 28, 2024

/override ci/prow/sonarcloud

Copy link

openshift-ci bot commented Aug 28, 2024

@yanmxa: Overrode contexts on behalf of yanmxa: 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.

@yanmxa
Copy link
Member Author

yanmxa commented Aug 28, 2024

/override "SonarCloud Code Analysis"

Copy link

openshift-ci bot commented Aug 28, 2024

@yanmxa: /override requires failed status contexts, check run or a prowjob name to operate on.
The following unknown contexts/checkruns were given:

  • SonarCloud Code Analysis

Only the following failed contexts/checkruns were expected:

  • ci/prow/gofmt
  • ci/prow/images
  • ci/prow/sonarcloud
  • ci/prow/test-e2e
  • ci/prow/test-integration
  • ci/prow/test-unit
  • pull-ci-stolostron-multicluster-global-hub-main-gofmt
  • pull-ci-stolostron-multicluster-global-hub-main-images
  • pull-ci-stolostron-multicluster-global-hub-main-sonarcloud
  • pull-ci-stolostron-multicluster-global-hub-main-test-e2e
  • pull-ci-stolostron-multicluster-global-hub-main-test-integration
  • pull-ci-stolostron-multicluster-global-hub-main-test-unit
  • tide

If you are trying to override a checkrun that has a space in it, you must put a double quote on the context.

In response to this:

/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.

@yanmxa
Copy link
Member Author

yanmxa commented Aug 28, 2024

/override "SonarCloud Code Analysis"

Copy link

openshift-ci bot commented Aug 28, 2024

@yanmxa: /override requires failed status contexts, check run or a prowjob name to operate on.
The following unknown contexts/checkruns were given:

  • SonarCloud Code Analysis

Only the following failed contexts/checkruns were expected:

  • ci/prow/gofmt
  • ci/prow/images
  • ci/prow/sonarcloud
  • ci/prow/test-e2e
  • ci/prow/test-integration
  • ci/prow/test-unit
  • pull-ci-stolostron-multicluster-global-hub-main-gofmt
  • pull-ci-stolostron-multicluster-global-hub-main-images
  • pull-ci-stolostron-multicluster-global-hub-main-sonarcloud
  • pull-ci-stolostron-multicluster-global-hub-main-test-e2e
  • pull-ci-stolostron-multicluster-global-hub-main-test-integration
  • pull-ci-stolostron-multicluster-global-hub-main-test-unit
  • tide

If you are trying to override a checkrun that has a space in it, you must put a double quote on the context.

In response to this:

/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.

@openshift-merge-bot openshift-merge-bot bot merged commit ebcf16e into stolostron:main Aug 28, 2024
14 of 15 checks passed
@yanmxa yanmxa deleted the br_update_agent_manager branch September 20, 2024 07:03
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.

4 participants