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

Truncate diffs to avoid failing actions - Argument list too long #207

Open
allenporter opened this issue May 27, 2023 · 4 comments
Open

Comments

@allenporter
Copy link
Owner

Example run: https://github.com/allenporter/k8s-gitops/actions/runs/5099732326/jobs/9167613119

The output is so large it fails the action. We should instead have an option to truncate the diff and return a partial result.

@allenporter
Copy link
Owner Author

Here is a related feature request for dyff: homeport/dyff#280

allenporter added a commit that referenced this issue May 27, 2023
#208)

Add a default limit so that very large diffs do not fail github actions

Issue #207
@allenporter allenporter reopened this May 27, 2023
@allenporter
Copy link
Owner Author

This works so that the flux diff output succeeds, but now the output fails when adding the PR comment:

Error: An error occurred trying to start process '/home/runner/runners/2.304.0/externals/node16/bin/node' with working directory '/home/runner/work/k8s-gitops/k8s-gitops'. Argument list too long

@xakaitetoia
Copy link

Have same issue. Tried to Add resources requests on kube-prometheus-stack for all components 😬

Error: An error occurred trying to start process '/usr/bin/docker' with working directory '/home/runner/_work'. Argument list too long

1000 lines atm from the gh job

@allenporter allenporter changed the title Truncate diffs to avoid failing actions Truncate diffs to avoid failing actions - Argument list too long Apr 19, 2024
@jfroy
Copy link
Contributor

jfroy commented Jul 21, 2024

One way to work around this in a workflow is to output the diff to a file and use an action to post the diff file. I've done this with hacky Markdown formatting in https://github.com/jfroy/flatops/blob/main/.github/workflows/flux-diff.yaml.

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

No branches or pull requests

3 participants