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 a better status message #1492

Merged

Conversation

chmouel
Copy link
Member

@chmouel chmouel commented Nov 3, 2023

We are adding a better status message that will include the Namespace and the PipelineRun.

We link the Namespace to the Namespace view in the consoles.

Introducing a new setting for that custom-console-url-namespace that would need to be setup when using a custom console.

image

Changes

Submitter Checklist

  • 📝 A good commit message is important for other reviewers to understand the context of your change. Please refer to How to Write a Git Commit Message for more details how to write beautiful commit messages. We rather have the commit message in the PR body and the commit message instead of an external website.
  • ♽ Run make test before submitting a PR (ie: with pre-commit, no need to waste CPU cycle on CI. (or even better install pre-commit and do pre-commit install in the root of this repo).
  • ✨ We heavily rely on linters to get our code clean and consistent, please ensure that you have run make lint before submitting a PR. The markdownlint error can get usually fixed by running make fix-markdownlint (make sure it's installed first)
  • 📖 If you are adding a user facing feature or make a change of the behavior, please verify that you have documented it
  • 🧪 100% coverage is not a target but most of the time we would rather have a unit test if you make a code change.
  • 🎁 If that's something that is possible to do please ensure to check if we can add a e2e test.
  • 🔎 If there is a flakiness in the CI tests then don't necessary ignore it, better get the flakyness fixed before merging or if that's not possible there is a good reason to bypass it. (token rate limitation may be a good reason to skip).

Copy link

codecov bot commented Nov 3, 2023

Codecov Report

Attention: 58 lines in your changes are missing coverage. Please review.

Comparison is base (b8a129b) 61.63% compared to head (d30554f) 61.64%.
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1492   +/-   ##
=======================================
  Coverage   61.63%   61.64%           
=======================================
  Files         138      137    -1     
  Lines       10294    10371   +77     
=======================================
+ Hits         6345     6393   +48     
- Misses       3436     3461   +25     
- Partials      513      517    +4     
Files Coverage Δ
pkg/cmd/tknpac/resolve/resolve.go 65.02% <100.00%> (ø)
pkg/consoleui/custom.go 93.05% <100.00%> (+1.38%) ⬆️
pkg/consoleui/openshift.go 90.32% <100.00%> (+0.66%) ⬆️
pkg/customparams/customparams.go 92.40% <100.00%> (+0.51%) ⬆️
pkg/formatting/starting.go 100.00% <100.00%> (ø)
pkg/kubeinteraction/status/task_status.go 66.66% <100.00%> (+0.95%) ⬆️
pkg/pipelineascode/match.go 67.88% <100.00%> (ø)
pkg/pipelineascode/template.go 100.00% <100.00%> (ø)
pkg/provider/github/repository.go 71.42% <100.00%> (ø)
pkg/consoleui/interface.go 42.10% <0.00%> (-4.96%) ⬇️
... and 5 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@piyush-garg
Copy link
Member

lgtm
cc @savitaashture

variable:

* `{{ namespace }}`: The target namespace where the pipelinerun is executed

Copy link
Member

Choose a reason for hiding this comment

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

Can you add a example format how it looks like after adding {{ namespace }}

I mean something similar to what added in custom-console-url-pr-details
example: https://mycorp.com/ns/{{ namespace }}/pipelinerun/{{ pr }}

Copy link
Member Author

Choose a reason for hiding this comment

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

what do you mean for openshift? you only need this if you have a custom console and do not use the openshift console, you can have a custom console when running on openshift

@@ -250,6 +250,16 @@ A few settings are available to configure this feature:

Set this to the root URL of your custom console. example: `https://mycorp.com`

* `custom-console-url-namespace`
Copy link
Member

@savitaashture savitaashture Nov 6, 2023

Choose a reason for hiding this comment

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

For openshift we don't need to set this right ?

asking because when i test this changes i don't see namespace i details 🤔

Screenshot from 2023-11-06 16-48-57

Copy link
Member

Choose a reason for hiding this comment

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

I mean i tried manually i don't see Namespace and PR name in details 🤔

@chmouel
Copy link
Member Author

chmouel commented Nov 8, 2023

/retest

We are adding a better status message that will include the Namespace
and the PipelineRun.

We link the Namespace to the Namespace view in the consoles.

Introducing a new setting for that `custom-console-url-namespace` that
would need to be setup when using a custom console.

Signed-off-by: Chmouel Boudjnah <[email protected]>
@chmouel
Copy link
Member Author

chmouel commented Nov 8, 2023

/test linters

@chmouel
Copy link
Member Author

chmouel commented Nov 8, 2023

I installed this PR on dogfooding cluster you can see the example here:

https://github.com/openshift-pipelines/pipelines-as-code/pull/1492/checks?check_run_id=18482061202

redid most of the test reconciler to test this properly (it didn't before) with golden

@savitaashture
Copy link
Member

Verified on dogfooding cluster for both success and failure

image

Screenshot from 2023-11-08 20-47-20

@savitaashture savitaashture merged commit e07e441 into openshift-pipelines:main Nov 8, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants