-
Notifications
You must be signed in to change notification settings - Fork 973
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
Can't collect artifacts from a folder containing a "%" or ";" in its name #12466
Comments
Probably URL encoding or URL rewrite handling (server route handling) problems, although there are probably logs on your agent or server (not just job log) to see what's happening if it's not making it there. I'm not sure how much of this I care to support. At the margins it gets messy due to the way direct server filesystem artifact storage is used, and the way artifacts are archived and redownloaded by agents as archives that may or may not support the various special chars. Server could be windows but agent Linux, or different filesystems used underneath. I really don't suggest you rely on this. Better to zip or tarball them. |
After reconsidering this issue I agree with you that this case is so marginal that it should better be avoided than attempted to be handled. I am perfectly fine if you close the issue with a "Nothing to be done" resolution. Indeed, the error comes from unescaped special characters in the upload URL, e.g. for a percent sign (dir%):
|
Does the server log anything? Stack trace etc? Thanks for the additional logs - it's possible it might expose a more general encoding problem that could be of concern, so at some point I'll take a look, although I am aware of some old issues in this area such as #11707 (and fixed some bits recently via #11692) so it might be related. |
Yes, I shortened the stack trace in the previous message but here is it in full. This is what the agent logs, the server doesn't log any details, only prints the failed job status.
|
Issue Type
Summary
I have a test checking that all special characters are correctly handled in my program. The program creates folders with special characters. In GoCD if an artifact wildcard pattern matches one of such folders containing a "%" or ";" in its name then uploading the artifacts fails.
Basic environment details
23.5.0 (18179-7702b283accd1f90f014f0087aa2e9bd8baf4a97).
17.0.9
Linux 5.15.0-88-generic
Steps to Reproduce
Create such a shell job:
mkdir %
touch %/test.log
Create an artifact pattern **/*.log
Run the pipeline with this job.
Expected Results
%/test.log successfully uploaded to the artifact folder of the GoCD server.
Actual Results
Job log:
The same behaviour is observed with a ";". Interestingly, the error occurs only for folders, artifact files
dir/%.log
anddir/";".log
are uploaded successfully.The text was updated successfully, but these errors were encountered: