Skip to content

Show workflow names if there are multiple configs #2978

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

Closed
wants to merge 3 commits into from

Conversation

Tchoupinax
Copy link
Contributor

Hey!

I noticed that when there is only one triggered pipeline, the name of the pipeline is not displayed. However, the information is valuable.
This MR tries to display it when there is only one pipeline

@Tchoupinax
Copy link
Contributor Author

With several pipelines
image

With one pipeline
image

@zc-devs
Copy link
Contributor

zc-devs commented Dec 20, 2023

Is this behavior prior PR? If yes, could you provide screenshots after applying your changes?

Perhaps, you mentioned workflow.

How does it work for people, who always run one workflow?

Copy link
Member

@6543 6543 left a comment

Choose a reason for hiding this comment

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

this was a UX dessision to not show it in single workflow mode ... as in 90% of cases it will just show "woodpecker"

@6543
Copy link
Member

6543 commented Dec 21, 2023

through @Tchoupinax thanks for submitting a pull request anyway :)

An idea to address your problem, what about a mouse hover over wicht will show a info text with the name in it?
through i dont know where that area should be 😅

@Tchoupinax
Copy link
Contributor Author

Tchoupinax commented Dec 21, 2023

@zc-devs Thank for the architecture schema, nice to understand!

this was a UX dessision to not show it in single workflow mode ... as in 90% of cases it will just show "woodpecker"

Yes I see the problem... but basically is it not an invitation to correctly name your yaml file?

The "mouse over" solution is not ideal but can work if I really want to know which workflow is running

@qwerty287
Copy link
Contributor

Yes I see the problem... but basically is it not an invitation to correctly name your yaml file?

No, because if you have only one workflow, it should be called .woodpecker.yaml which is woodpecker as workflow name

@xoxys
Copy link
Member

xoxys commented Dec 22, 2023

No, because if you have only one workflow, it should be called .woodpecker.yaml which is woodpecker as workflow name

I can't find the original PR again, which has changed this behavior. What happens if a user has 5 workflows, but on PR's 4 are filtered out by a condition and only one workflow remains? Will this also not show the name of the single remaining workflow?

@6543
Copy link
Member

6543 commented Dec 22, 2023

Good point, that should probably show the name. It does not atm

@6543
Copy link
Member

6543 commented Dec 22, 2023

A fix should be simple, instead of count workflows, count reported config files

@xoxys
Copy link
Member

xoxys commented Dec 22, 2023

Or just always show the name and call it Default or similar in case there is a single config file? Personally, I don't like conditional UI layout changes on the exact same view. The pipeline step list should have the same layout all the time.

@lafriks
Copy link
Contributor

lafriks commented Dec 22, 2023

Maybe hide only if the name is woodpecker?

@Tchoupinax
Copy link
Contributor Author

Maybe hide only if the name is woodpecker?

I love the idea! So great!

@qwerty287
Copy link
Contributor

qwerty287 commented Dec 22, 2023

I don't think that's a good idea as you can change the default file name and you wouldn't have any benefit from showing it. I like @6543 's approach to just count workflow configs instead of workflows.

@lafriks
Copy link
Contributor

lafriks commented Dec 22, 2023

I don't think that's a good idea as you can change the default file name and you wouldn't have any benefit from showing it. I like @6543 's approach to just count workflow configs instead of workflows.

The problem is that you can have 3 pipelines with different conditions with the same step names and by opening the workflow there might be only one and you won't be able to tell which is executed as the name is hidden.

Anyway we know what the default one is, so let's hide only the default not by count as this has a problem as I gave example above as I myself have got into this problem as I have such pipelines and have sometimes recheck what where conditions to understand which one is failing

@xoxys
Copy link
Member

xoxys commented Jan 13, 2024

The problem is that you can have 3 pipelines with different conditions with the same step names and by opening the workflow there might be only one and you won't be able to tell which is executed as the name is hidden.

The approach was to count config files not workflows and I still think that's the best approach.

@6543
Copy link
Member

6543 commented Jan 19, 2024

@Tchoupinax could you fix the conflicts and update acording to the discussion

@qwerty287 qwerty287 added ui frontend related enhancement improve existing features labels Jan 22, 2024
@anbraten
Copy link
Member

anbraten commented Feb 8, 2024

I've applied the requested changes, but haven't tested it yet.

@anbraten anbraten changed the title feat: add pipeline name even if there is only one Show workflow names if there are multiple configs Feb 8, 2024

const singleConfig = ref(false);
const pipelineConfigs = ref<PipelineConfig[]>();
async function loadPipelineConfig() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like we call this multiple times, I don't like it.
Either:

  • Add a new field config_count to the repo api model
  • use inject to reuse the configs that are loaded already

@qwerty287 qwerty287 added this to the 2.4.0 milestone Feb 11, 2024
@qwerty287 qwerty287 modified the milestones: 2.4.0, 2.5.0 Feb 26, 2024
@qwerty287 qwerty287 modified the milestones: 2.5.0, 2.6.0 Apr 15, 2024
@qwerty287
Copy link
Contributor

-> #3767

@qwerty287 qwerty287 closed this Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improve existing features ui frontend related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants