Issues icon indicating copy to clipboard operation
Issues copied to clipboard

Config as Code: Error after changing to a branch that is missing Octopus configuration

Open bec-callow-oct opened this issue 6 months ago • 0 comments

Severity

Non-blocking, the workaround is not ideal but is fine for now

Version

2025.3.2120

Latest Version

I could reproduce the problem in the latest build

What happened?

When the Could not access Version Control page is displayed, selecting a different branch from the list results in an error. To restore the page, the user must either refresh or navigate away.

Version control in Octopus can be configured by repository directory, which allows users to connect multiple projects to a single repository. Branches used by a project must have a schema_version.ocl file in the relevant repository directory (added automatically by Octopus when the branch is created).

When a new project is added and linked to a new directory in the same repository, it doesn't automatically receive the configuration files for existing branches, but the branches are still listed as available when trying to switch branches, for example at the top of the project process page. Because the configuration files are missing, an error occurs.

Reproduction

  1. Connect a project to version control and specify a directory within the repository. Image

  2. Create at least one new branch (first-project) within Octopus. This is available in the dropdown on any CAC page such as Project Process.

  3. Repeat step 1 for another project with a different directory and branch name (second-project).

  4. In the second project, navigate to the Process page and select the first-project branch from the dropdown. Image

  5. The Could not Access Version Control page should appear as the branch is not configured. Image

  6. Navigate to the Version Control Settings page. The error is displayed there as well Image

  7. Return to the Project Process page. The Could not Access Version Control page should be displayed again. Select second-project from the dropdown. This branch is correctly configured for this project, so no error should occur, but a server error is displayed. Image

Error and Stacktrace

Octopus configuration not found in the ".octopus/test" directory of reference refs/heads/test: The file 'schema_version.ocl' does not exist in the Git repository.

More Information

No response

Workaround

Refresh the page when the error is displayed and the page should be restored with a valid branch selected.

bec-callow-oct avatar Jun 17 '25 02:06 bec-callow-oct