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

Failed to load parameters after modify without refresh UI #836

Closed
chilianyi opened this issue Oct 18, 2022 · 2 comments · Fixed by #837
Closed

Failed to load parameters after modify without refresh UI #836

chilianyi opened this issue Oct 18, 2022 · 2 comments · Fixed by #837
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@chilianyi
Copy link
Contributor

What is version of KubeSphere DevOps has the issue?

v3.3.1-rc.1

How did you install the Kubernetes? Or what is the Kubernetes distribution?

kubekey

What happened?

There is a parameter in the pipeline, named branch.
Refresh the dashboard.
Then add a new parameter test for the pipeline.
截屏2022-10-18 09 19 06

截屏2022-10-18 09 19 45

Two request,first post,then get,return two parameters。
but when click run,only show one parameter,until refresh the dashboard,will show two parameters。
截屏2022-10-18 09 19 54

Relevant log output

No response

Additional information

No response

@chilianyi chilianyi added the kind/bug Categorizes issue or PR as related to a bug. label Oct 18, 2022
@chilianyi
Copy link
Contributor Author

related to #633

@chilianyi
Copy link
Contributor Author

When update build parameters without jenkinsfile:

There are two reconcile flow:

  1. pipeline controller
    1.1. update pipeline cr spec
    1.2. update jenkins config and update pipeline cr metadata.annotations.pipeline.devops.kubesphere.io/spechash

  2. pipeline metadata cotroller
    2.1. get metadata info from jenkins config
    2.2. update pipeline cr metadata
    2.3. repeated every 10s

Problem 1: The secondary reconcile flow will repeated every 10s, so may delay 10s at most after modify build parameters in console.

Problem2: When update build parameters in console, will send two request, one is put, another is get. When click run button, will not send get pipeline request, so console will not get correct parameters.

To solve the two problem:

  1. When spec in pipeline cr update, trigger metadata controller reconcile, update pipeline cr metadata in time.
  2. Because operation 1 is asynchronous,may be less than 1s delay, so console can not send get pipeline request just after a post pipeline request. Change the flow to:
    a. Only send post pipeline request when update build parameters in console.
    b. Send get pipeline request when user click run button, then load the latest build parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant