Beautifying our UI: Giving Gitlab build features a fresh look
about.gitlab.com
about.gitlab.com
curl "https://${GITLAB_URL}/api/v4/projects/${GITLAB_PROJECT}/pipelines/${GITLAB_PIPELINE}/jobs?per_page=100&private_token=${GITLAB_TOKEN}" | jq 'map([select(.started_at and .finished_at) | {name: (.stage + ": " + .name), cat: "PERF", ph: "B", pid: .pipeline.id, tid: .id, ts: (.started_at | sub("\\.[0-9]+Z$"; "Z") | fromdate \* 10e5)}, {name: (.stage + ": " + .name), cat: "PERF", ph: "E", pid: .pipeline.id, tid: .id, ts: (.finished_at | sub("\\.[0-9]+Z$"; "Z") | fromdate \* 10e5)}]) | flatten(1) | .[]' | jq -s > "${GITLAB_PIPELINE}-trace.txt"Would it be ok for you if I add that command snippet into a blog post I am currently writing about Observability for Efficient DevSecOps Pipelines? Draft MR is in https://gitlab.com/gitlab-com/www-gitlab-com/-/issues/34296 Thanks!
Regarding pipeline visibility and traces: I would love to see the same :-) I tested tracepusher with OpenTelemetry this week, and the timeline for CI/CD traces is a great start in Jaeger. Added a suggestion into https://gitlab.com/groups/gitlab-org/-/epics/5071#note_14582... where CI/CD Visibility is being worked on, with an update on GitLab support for traces in https://gitlab.com/groups/gitlab-org/-/epics/5071#note_14584...
https://gitlab.com/gitlab-org/gitlab/-/issues/236018#note_39...
Fantastic insights in the issue, next to the scripts. One could write a script that generates Mermaid charts in Markdown, and document the CI/CD infrastructure automatically - with CI/CD pipelines itself. Hmmm :)
But GitHub also understands which information to emphasise, and what to hide. In contrast, GitLabs UI often feels like they scattered as much information as they could, with no thought to placement and grouping. For example, in the before, why is the number of jobs displayed next to the MR, and then the MR is displayed again further down?
They're also often unnecessarily explicit: spelling out "3 minutes, 12 seconds" instead of "3m 12s" and using full sentences instead of definition lists.
I've found that philosophy has followed to actions output. I can pretty easily follow the DAG shown in any GitLab pipeline view, but GitHub just gives me a sequential list of jobs on the left and I'm left to just remember whether any of them were dependent on previous jobs else go read the code to figure that out.
Maybe it's just familiarity, as I've self hosted GitLab and its CI for years before actions were a thing, to the tune of nearly 8 years now. Personally, I was really disappointed in the implementation and the UX/DX of Actions as their own brand new construct rather than a DSL for gluing together the shell commands you already run on your dev machine.
Today parent pipelines cannot consume any test report from the child pipeline using the Gitlab CI DSL: https://gitlab.com/groups/gitlab-org/-/epics/8205
We would effectively need to roll up the child pipeline's results manually in the parent pipeline by calling APIs ourselves.
Github Actions which is largely free (if you use your own runners) is much better.
I thought gitlab ci was mostly containers.
GitHub makes it nearly impossible to replicate a CI build locally unless you're super familiar with the actions being used and how they were implemented, because actions are highly abstracted from what is actually happening.
GitLab CI is just a series of shell commands with a container image for context (bring your own tools).
It's usually pretty easy to figure out a GitLab build unless you get fancy with includes or child jobs which imo, for the aforementioned reasons, are substantial antipatterns.
One can also build once and test multiple ways with this method (e.g., build a ABI3-using Python wheel once and test it with all newer versions of Python with distinct jobs to spread the work and to allow the pipeline to show better things at a glance.
I have no idea how to do such "tee" bits in GitHub Actions (though I haven't looked in a while, the artifacts usage seem…convoluted compared to GitLab's "here's a list of globs"). For that matter, "join"s would be nice too (e.g., to collect the 20 or so wheels built across various jobs into one `twine` upload).
There are quite a few issues I follow, sometimes they are very small, sometimes they are huge epics. While I love GitLab and GitLab CI, I find myself hitting some of these frustrating issues nearly every time I do something uncommon.
They usually end up being delivered and well done, which is to the credit of the awesome folks at GitLab, but they rarely take less than a few years.
That's what I've done before joining the company, so it works ;)
At that point you're probably not creating builds, you're creating apps, and you should just use an actual programming language that supports tests and debugging, and pull that into your pipelines as a proper tool with proper controls and its own build.
They should do an even/odd bug fix/new feature release cadence.
I figured I'd build my own UI to solve that, so I did. It's here: https://geevee.netlify.app/.
A benefit it has over a native GitLab UI is that it downloads and caches the project/group hierarchy in local storage (it's entirely client side), and can be refreshed on demand. It groups variables by environment mask and gives you a view of the entire variable hierarchy for a project.
Maybe some others might find it useful :)
Unfortunately environment scopes are only available on premium so I can't demonstrate that, but it solves one of the major issues with the existing UI in that it doesn't give you an environment-centric variable view.
Also, it looks like it's only possible to view inherited variables when viewing the vars for a project. Group's don't show the inherited variables for their parents.
I also much prefer the project tree view to clicking around the gitlab UI so much, and when you're configuring a pipeline its quite tedious.
I'll show your demo to the team handling CI secrets, thanks again for sharing! :)
In terms of UI, I would love to see more adoption of TUIs similar to soft-serve.
It’s a real shame that Gitlab’s pricing went up so much. I have no doubt that many of the clients I work with that are wasting countless hours trying to add core functionality and reliability to GitHub Actions would be on Gitlab.
Actually, I was recently writing up a list of issues that the teams I work with have with it the other day. I'll share it here however I'll have to post an update to later as it's missing one of my sources.
Github is aware of (and somewhat accepts) every one of these items.
-There are frequent outages (several times a week, sometimes daily) to Github Actions APIs that result in people having to retry workflows that are stuck, slow or fail due to some upstream Github issue.
- There's no way to manage the settings of repos in code (e.g. protected branches, status checks, etc) - this is a huge pain point for us as we have to manually set these things up for each repo and branch.
- If someone makes a comment on a PR and the author pushes new changes to the PR the conversation doesn't show in the PRs diff, nor do other peoples unresolved comments - but they are all still required to be resolved/closed before a merge can occur - this is not at all obvious to the reviewer or the author.
- There's no deployments dashboard to see what is deployed where and what the status of those deployments are.
- There's no concept of application health as part of a repo, the code is very disconnected from what is actually deployed.
- Notifications are a mess - you can't easily see what notifications you have set up and for what repos. You can't manage them in code. There's so much noise in the notifications that it's hard to see what's important - almost all of them end up getting missed.
- There's no way to manage the secrets in code - you have to manually set them up for each repo.
- Linting Github Actions workflows is unreliable even using Github/Microsoft's own VSCode and Github Actions plugins.
- There is no easy to use way of testing Actions locally or on a branch.
- Scheduled workflows only ever run from the default branch.
- There's no internal or private Actions marketplace.
- Reusing code is an absolute mess, Composite Actions vs Reusable Workflows vs Actions - all slightly different with different edge cases and limitations. (See https://smcleod.net/2022/11/github-not-so-reusable-actions/)
- Standard YAML anchors aren't supported.
- There's no way to manage the status checks that must pass across a given set of repos for a team, you have to do them all one by one for each branch that is protected....
- There's no concept of grouping repositories for a project, team or product.
- "The console log (which is a critical part of any CI system) is incredibly buggy - often sitting there blank for 10 mins with no output.
- Not easy to audit who has made changes or version control settings in the UI.
- Retrying a job that failed on an upstream action/workflow after it has been fixed - results in the previous version being used again silently without warning and no option to use latest version.
- Custom roles locked down to org admins.
- No ability for engineers to update / replace secrets without granting them full blown admin access.
- You can't set per-workflow timeouts.
- If you're investigating an issue in the console output and the run ends the output is collapsed and you lose what you're looking at and have to find it again.
There’s a lot more I can add later.
[1] https://about.gitlab.com/direction/#fy24-roadmap [2] https://about.gitlab.com/company/okrs/fy24-q2/#okrs
In the meantime, I am more than thankful for an alternative to the GitHubiverse, and I am progressively trying to wean myself off it onto GitLabia. I just wish I could have both.
https://gitlab.com/gitlab-org/gitlab-foss/-/issues/12776
and then closed with the claim that this was implemented, when in fact, it was not.
For example, searching MRs doesn't let you search multiple fields.
(One current limitation though is that only finished pipelines show up, no ongoing ones).
One thing we particuarly miss from the Bitbuket days is the ability to link to multiple ranges of lines. Gitlab can only do a single range, as if it's doing charity.
If you ask me, they'd have to pay me pretty heavy sum to use their product.
https://gitlab.com/gitlab-org/gitlab/-/issues/22578
its just one number, I just wish they could add this one little thing so I could move away from GitHub once and for all. even CodeBerg has it:
I struggled to spot the differences between the before and after. In my company, “complete redesign” has a totally different meaning.
Designers aiming to impress their peers over basic UX principles. They all need to go back and (re)read "Don't Make Me Think"
I have copied it into the feedback issue https://gitlab.com/gitlab-org/gitlab/-/issues/414756#note_14... (also linked in the blog post). Feel free to add more details and thoughts. Thanks!
The picture in the blog post needs an update. I just checked a running pipeline that shows the green `latest` label. Added a screenshot of the pipeline, and the update suggestions for our teams into https://gitlab.com/gitlab-org/gitlab/-/issues/414756#note_14...
We've updated the image in the blog post: https://about.gitlab.com/blog/2023/07/05/beautifying-of-our-....