-
Notifications
You must be signed in to change notification settings - Fork 81
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
Make custom console respect custom params #1250
Make custom console respect custom params #1250
Conversation
0d6d3bb
to
3a91290
Compare
Golang test coverage difference reportCoverage decreased by Package report
|
cc @mramendi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @chmouel I have reviewed and executed code locally
Below are observation
- This is how i configured in pipelines-as-code cm
custom-console-name: savitaconsole
custom-console-url: https://testconsole.com
custom-console-url-pr-details: https://testconsole.com/detail/{{ custom }}
custom-console-url-pr-tasklog: https://testconsole.com/log/{{ custom }}
My repo CR has
params:
- name: custom
value: value
- When CI started it gave custom console link properly
https://testconsole.com/detail/value
- But when CI succeed the task URL started pointing to Openshift Console again
ex:
https://console-openshift-console.apps.51d375a4ef5b7ed2d78a.hypershift.aws-2.ci.openshift.org/k8s/ns/article-pipelines/tekton.dev~v1beta1~PipelineRun/article-no-operation-run-kxznh/logs/noop-task
Is that because you did not pass params here https://github.com/openshift-pipelines/pipelines-as-code/blob/main/pkg/params/run.go#L109 ?
@@ -0,0 +1,74 @@ | |||
package customparams |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add test for cel as well ?
@@ -64,6 +65,15 @@ func (p *PacRun) Run(ctx context.Context) error { | |||
p.manager.Enable() | |||
} | |||
|
|||
// set params for the console driver, only used for the custom console ones | |||
cp := customparams.NewCustomParams(p.event, repo, p.run, p.k8int, p.eventEmitter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this changes only for custom console
So do we need to check if custom console configurations are set or not
If not set then we should skip this entire part?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah maybe we can make it conditional, i was thinking there may be other console driver that may need that information in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but yeah we don't know which driver is set from the interface we could add this but that's fine to have it to setparams by default, it can be used in the future and maybe not worse the refacotring
this is weird, it's the watcher who report the final status, and we set the params in the watcher as soon as we get a repo match, i need to test on openshift more often 🙃 cause it works on tekton/dashboard |
3a91290
to
60de549
Compare
I was thinking how e2e passing but realized that we don't run e2e on Openshift 😆 |
Re verified and now its giving correct task log URL 🤷♀️ |
9649370
to
39a0858
Compare
/retest |
we really need to fix that bug where when previously failing it doesn't clear the old status when there is a infra error or something |
Do we have an already created issue or Do we need to create one ? |
I think we can merge the PR once after addressing that doc issue |
Making it easier to consume between controller and watcher Reworked most tests along the way and some refactor cleaning Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
Add our own function to apply configmap setting and revert to original state automatically. Remove gitea_custom_console_dashboard_test test since we have this covered with params. Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
ba359ba
to
780f3e2
Compare
🎉 🎉 |
|
||
example: `https://mycorp.com/ns/{{ namespace }}/pipelinerun/{{ pr }}/logs/{{ task }}#{{ pod }}-{{ firstFailedStep }}` | ||
example: `https://mycorp.com/ns/{{ namespace }}/pipelinerun/{{ pr }}/logs/{{ task }}#{{ pod }}-{{ firstFailedStep }}` | ||
|
||
## Pipelines-As-Code Info | ||
|
||
There are a settings exposed through a config map for which any authenticated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove "a"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also remove "for"
|
||
## Pipelines-As-Code Info | ||
|
||
There are a settings exposed through a config map for which any authenticated | ||
user can access to know about the Pipeline as Code status. | ||
user can access to know about the Pipeline as Code status. This Configmap | ||
will be automatically created with the [OpenShift Pipelines Operator](https://docs.openshift.com/container-platform/latest/cicd/pipelines/understanding-openshift-pipelines.html) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be nice to mention the name of the ConfigMap, seeing as the user might want to access it?
Making it easier to consume between controller and watcher
Reworked most tests along the way and some refactor cleaning
Signed-off-by: Chmouel Boudjnah chmouel@redhat.com
Changes
Submitter Checklist
make test lint
before submitting a PR (ie: with pre-commit, no need to waste CPU cycle on CI