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

Build information doesn't support package ids with './' #9157

Open
felixi-octopus opened this issue Dec 9, 2024 · 1 comment
Open

Build information doesn't support package ids with './' #9157

felixi-octopus opened this issue Dec 9, 2024 · 1 comment
Labels
kind/bug This issue represents a verified problem we are committed to solving

Comments

@felixi-octopus
Copy link

felixi-octopus commented Dec 9, 2024

Severity

No response

Version

2020.3

Latest Version

I could reproduce the problem in the latest build

What happened?

Attempting to create build information with ./ in the package id results in a

There was a problem with your request.

 - The package ID contains invalid characters. Examples of valid package IDs include 'MyPackage' and 'MyPackage.Sample'.

There are scenarios where build information can be associated with packages that have a ./ in it eg. A package can have an id of ./package-name when it does not have an Azure Dev Ops organization

Reproduction

Using LINQPad, set apiKey and server

<Query Kind="Statements">
  <NuGetReference>Octopus.Client</NuGetReference>
  <Namespace>Microsoft.Extensions.DependencyInjection</Namespace>
  <Namespace>System.Net.Http</Namespace>
  <Namespace>System.Text.Json</Namespace>
  <Namespace>System.Threading.Tasks</Namespace>
  <Namespace>Octopus.Client</Namespace>
  <Namespace>Octopus.Client.Model</Namespace>
  <Namespace>Octopus.Client.Model.BuildInformation</Namespace>
  <Namespace>Octopus.Client.Model.IssueTrackers</Namespace>
  <IncludeAspNet>true</IncludeAspNet>
</Query>



var apiKey = "API-";
var server = "";

var client = new OctopusClient(new OctopusServerEndpoint(server, apiKey));
var global = client.Repository;


var spaceRepository = client.Repository.ForSpace(client.Repository.Spaces.FindByName("Default"));

spaceRepository.BuildInformationRepository.Push(
	packageId: "Te./t",
	version: "1.0.0",
	octopusMetadata: new OctopusBuildInformation()
	{
		Branch = "refs/heads/main",
		BuildEnvironment = "Production",
		BuildNumber = "1",
		BuildUrl = "https://build.server.com/Samples.BuildInformation/1",
		VcsCommitNumber = "100",
		VcsRoot = "https://github.com/TestOrg/Samples.BuildInformation",
		VcsType = "Git",
		Commits = new[] {
			new Commit
			{
				Id = "f61aa91b0204c796be1b77e983240229e203914e",
				Comment = "Fixes #1"
			}

		}
	},
	OverwriteMode.OverwriteExisting
);

Error and Stacktrace

No response

More Information

No response

Workaround

No response

@felixi-octopus felixi-octopus added the kind/bug This issue represents a verified problem we are committed to solving label Dec 9, 2024
@felixi-octopus
Copy link
Author

The Octopus engineering team has reviewed this issue.
After careful consideration, we’ve classed this low priority. This means we won’t work on it in the near future.
We prioritize issues based on the number of people affected, the impact type, and available workarounds.
If you’ve encountered this issue and haven’t informed our support team, please email support@octopus.com. Knowing how many people this issue affects helps us determine its priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This issue represents a verified problem we are committed to solving
Projects
None yet
Development

No branches or pull requests

1 participant