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

Post comment on PR/MR if pipelinerun can't be started for some reason #1743

Open
ralphbean opened this issue Jul 24, 2024 · 1 comment
Open

Comments

@ralphbean
Copy link
Contributor

We have a scenario where users are submitting merge requests to a gitlab repo (correctly enrolled with PaC) from a private fork that PaC doesn't have access to with its token. PaC sees the merge request event, but cannot access the private fork to retrieve the pipelienrun definition - and it fails. It will emit errors in its controller logs about this, but the end user doesn't see this. It looks like silence from PaC in the merge request itself.

💡 When PaC cannot start a pipelinerun on a mergerequest or pull request event for some reason like this, it should comment on the PR/MR with the reason. Even if not much useful information can be provided, it is better than radio silence.

There are some cases (like evaluation of on-cel-expression that precludes the execution of the pipelinerun) where a comment on the PR/MR is not desirable.

@ralphbean
Copy link
Contributor Author

ralphbean commented Jul 30, 2024

I just saw a different instance of this tonight in ansible/ansible-ai-connect-service#1240.

There, the user had an invalid pipelinerun (their task had runAftter: mytask instead of runAfter: [mytask]). PaC failed in its controller logs with: tekton validation error: json: cannot unmarshal string into Go struct field PipelineTask.spec.pipelineSpec.tasks.runAfter of type []string, but the user had no idea. They just assumed PaC was broken because they got no feedback on the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant