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

Multi file selection S3 with glob tries to include relative path in bucket key #5066

Closed
shaunmarx opened this issue Nov 8, 2018 · 6 comments

Comments

@shaunmarx
Copy link

commented Nov 8, 2018

Prerequisites

  • I have verified the problem exists in the latest version
  • I have searched open and closed issues to make sure it isn't already reported
  • I have written a descriptive issue title
  • I have linked the original source of this report
  • I have tagged the issue appropriately (area/*, kind/bug, tag/regression?)

The bug

When specifying a multi file selection to upload to S3 such as the default provided i.e. **/* something strange starts to happen where relative file paths make an appearance in the bucket key for example ../file.json

What I expected to happen

Absolute paths should be provided which would represent the bucket key prefix for the file as relative file paths just don't make sense and consequently cause uploads to fail as the characters are illegal.

Steps to reproduce

  1. Ensure you have a package with multiple folders and files (GitHub feed will also work)
  2. Create a new S3 step
  3. Choose to upload files within the package
  4. Configure the required account, bucket and region
  5. Add a standard multi-file selection such as */

Log exerpt

10:36:32   Info     |       Glob pattern '**/*' matched 9 files.
10:36:32   Info     |       Attempting to upload C:\Octopus\worker-local\Work\20181108003628-14234-28\staging\bucket-noparamfile.json to some-amazing-bucket with key ../bucket-noparamfile.json.
10:36:32   Error    |       Calamari.Aws.Exceptions.UnknownException: An unrecognised Forbidden error was thrown while uploading to some-amazing-bucket
10:36:32   Error    |       at Calamari.Aws.Deployment.Conventions.UploadAwsS3Convention.Install(RunningDeployment deployment)
10:36:32   Error    |       at Calamari.Deployment.ConventionProcessor.RunInstallConventions()
10:36:32   Error    |       at Calamari.Deployment.ConventionProcessor.RunConventions()
10:36:32   Error    |       Running rollback conventions...
10:36:32   Error    |       An unrecognised Forbidden error was thrown while uploading to bucket test-shaun-awesome-bucket
10:36:32   Error    |       Calamari.Aws.Exceptions.UnknownException
10:36:32   Error    |       at Calamari.Aws.Deployment.Conventions.UploadAwsS3Convention.Install(RunningDeployment deployment)
10:36:32   Error    |       at Calamari.Deployment.ConventionProcessor.RunInstallConventions()
10:36:32   Error    |       at Calamari.Deployment.ConventionProcessor.RunConventions()
10:36:32   Error    |       at Calamari.Aws.Commands.UploadAwsS3Command.Execute(String[] commandLineArguments)
10:36:32   Error    |       at Calamari.Program.Execute(String[] args)

Affected versions

Octopus Server: 2018.8.0 - 2018.9.7

Links

Original report

@shaunmarx

This comment has been minimized.

Copy link
Author

commented Nov 13, 2018

Release Note: Fixed an issue with the S3 step where invalid bucket keys were being used when using multiple file selections

@shaunmarx shaunmarx added this to the 2018.9.10 milestone Nov 13, 2018
@slewis74 slewis74 modified the milestones: 2018.9.10, 2018.9.8 Nov 13, 2018
@BoMoro

This comment has been minimized.

Copy link

commented Nov 14, 2018

Could you please say me when Octopus cloud version will update?

@shaunmarx

This comment has been minimized.

Copy link
Author

commented Nov 14, 2018

@BoMoro I believe the hosted instances would be updated during your nominated outage window. We can do this for you sooner if you send a request through to support@octopus.com with the instance information.

@liatmayo

This comment has been minimized.

Copy link

commented Nov 14, 2018

Can you please clarify - if I have a nightly outage window, it is expected to be updated tonight?

@shaunmarx

This comment has been minimized.

Copy link
Author

commented Nov 14, 2018

@liatmayo it would seem that our hosted instances are currently configured to use 2018.9.5, which means that your instance will not be upgraded to 2018.9.8 or newer unless you send a request through to support@octopus.com asking for your instance to be upgraded to this version.

@lock

This comment has been minimized.

Copy link

commented Feb 12, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. If you think you've found a related issue, please contact our support team so we can triage your issue, and make sure it's handled appropriately.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants
You can’t perform that action at this time.