Feature Requests

Anonymous

Feature Requests for Harness. Select 'Category' based on the module you are requesting the feature for.
Immutable Git Experience template versions
Summary A Git Experience template version should be immutable and tied to the Git commit it was published from. Today each template version needs its own YAML file in the repository, and a published version can still be changed by editing that file. Background We use Git as the source of truth for our templates, and we version them with semantic versioning. Today every version of a template is its own file: .harness/orgs/my_org/templates/my_stage_template/v1.0.0.yaml .harness/orgs/my_org/templates/my_stage_template/v1.0.1.yaml .harness/orgs/my_org/templates/my_stage_template/v1.1.0.yaml Each new version copies the whole YAML of the previous one, so the repository fills up with near-identical files, and the history of a template is spread across them. A published version is not immutable. Anyone can change v1.0.0.yaml on the default branch, and every pipeline that uses v1.0.0 picks up the change. Expected behaviour One file per template. The version label stays in the template YAML, as it is today. When a version is published, Harness ties it to the commit it was published from. That version is immutable: a pipeline that uses it always gets the template as it was in that commit. A change to the template that keeps the same versionLabel is rejected. Changing a template means publishing a new version. To release a new version, we change the template and bump versionLabel in the same file. Earlier versions stay available from their own commits. For example, a single file: .harness/orgs/my_org/templates/my_stage_template/template.yaml template: name: My Stage Template identifier: my_stage_template versionLabel: v1.1.0 type: Stage spec: ... A pipeline can then use v1.0.0 or v1.1.0 , and each resolves to the template from its own commit. Advantages No duplicated YAML per version: the history of a template lives in Git, and versions can be compared with a normal diff. Published versions can't change underneath the pipelines that use them, so builds are reproducible.
0
·
Continuous Integration
Support webhook secret for Git Experience webhooks
Summary Git Experience webhooks have no option for a webhook secret. The webhook that Harness registers in GitHub for Git Experience is created without a secret, and there is no field to set one in the UI, the API or the Terraform resource harness_platform_gitx_webhook . Webhook triggers already support a secret, and Harness sets it on the GitHub webhook it creates for the trigger. Git Experience webhooks should support the same. Background We expect every webhook that Git Experience registers in GitHub to have a secret set. We manage Harness with Terraform and register a Git Experience webhook with harness_platform_gitx_webhook for each repository that holds Harness entities. Harness creates the webhook in GitHub, but without a secret. The secret has to be added manually in GitHub for each repository after Harness creates the webhook, which adds a manual step to onboarding every new repository. We would like this to work the same way as triggers. A trigger takes a secret reference ( encryptedWebhookSecretIdentifier ), and Harness sets that secret on the GitHub webhook it creates for the trigger. Git Experience webhooks should offer the same. Requested feature Add an optional secret reference to Git Experience webhooks, in the UI, the API and harness_platform_gitx_webhook , like encryptedWebhookSecretIdentifier on triggers. When Harness registers the Git Experience webhook in GitHub, it sets that secret on the webhook. Harness verifies the signature of incoming Git Experience events and rejects events that don't match. For example, in Terraform: resource "harness_platform_gitx_webhook" "my_repo" { identifier = "my_repo" name = "my-repo" org_id = "my_org" repo_name = "my-repo" connector_ref = "my_github_connector" folder_paths = [".harness/orgs/my_org/projects/.."] webhook_secret = "org.my_webhook_secret" # new, optional: reference to a Harness secret } Benefits Git Experience webhooks are secured the same way as trigger webhooks. Onboarding a repository needs no manual step in GitHub: the Terraform that registers the webhook also sets its secret.
0
·
Continuous Integration
Codebase build input of a pipeline template should stay as runtime input of the consuming pipeline
Summary When a pipeline template leaves the codebase build open ( properties.ci.codebase.build: <+input> ), a pipeline that consumes the template should keep it as a runtime input automatically. Today the pipeline has to repeat build: <+input> under templateInputs . If it doesn't, Harness no longer treats the codebase build as a runtime input: a manual run shows no input form and fails, although the template still expects the value. Background Our CI pipeline template leaves the codebase build open, so each run can build a branch, a tag or a pull request: template: type: Pipeline spec: properties: ci: codebase: connectorRef: my_github_connector repoName: <+pipeline.variables.REPO> build: <+input> Every consuming pipeline has to repeat the codebase build input: pipeline: template: templateRef: org.my_pipeline_template versionLabel: v1.0.0 templateInputs: properties: ci: codebase: build: <+input> The block adds nothing. It only repeats what the template already says. What we tested A consuming pipeline with the codebase block, run manually: the input form asks for the branch, tag or pull request, and the run works. The same pipeline without the block, run manually: Harness reports no runtime inputs. No input form is shown, and the run fails because the codebase build has no value. The same pipeline without the block, run by a webhook trigger: it works, because the trigger supplies the build. Without the block, the resolved pipeline still contains build: <+input> from the template. The pipeline needs the codebase build, but Harness stops asking for it, and the failure only shows up on a manual run. Proposed Solution When the template leaves properties.ci.codebase.build as <+input> , it stays a runtime input of the consuming pipeline, unless the pipeline sets a value for it. The consuming pipeline only lists properties.ci.codebase under templateInputs when it sets a value. The run form, input sets and triggers see the codebase build input whether or not the pipeline repeats it. Benefits Consuming pipelines don't carry a codebase block that only repeats the template. Consistent behaviour across triggers: a manual run and a webhook trigger both get the codebase build input, whether or not the pipeline repeats it.
0
·
Continuous Integration
Pipelines should inherit template variables without reconciliation errors
Summary A pipeline that consumes a pipeline template should inherit the template's variable definitions and only set the values it wants to override. Today Harness expects the pipeline to repeat each variable's definition from the template, including its type, and shows a red reconciliation banner when it doesn't. The pipeline runs correctly either way. The banner should appear only when the pipeline's inputs actually conflict with the template, for example a missing required variable or a value that doesn't match the variable's type. Background A central platform team owns pipeline templates, and many product teams consume them. The template defines each variable once: name, type, description, required flag, and any default or allowed values. Consuming pipelines set only the values they need. Template: variables: - name: REPO type: String required: true value: <+input> - name: OPTIONAL_ARGS type: String required: false value: <+input> - name: OPTIONAL_FLAG type: String required: false value: <+input>.default(false).allowedValues(true,false) Consuming pipeline: template: templateRef: org.my_pipeline_template versionLabel: v1.0.0 templateInputs: variables: - name: REPO value: my-repo This pipeline runs, and the template's definitions and defaults apply to the variables it omits. Still, the console shows a red banner, "Some of the entities referenced in this pipeline have been updated.", with a Reconcile button. Harness expects the pipeline to define every template variable again, with the same type as in the template. Reconciling adds the omitted variables, and adds type: String to the variables the pipeline already sets. What we tested Omitting non-required variables: the pipeline runs and the template's values apply, but the red banner shows with reconciliation error Declaring every variable again in the pipeline, with name and value : the pipeline runs, but the banner still shows. Reconcile only adds type to each variable. Expected Behaviour A consuming pipeline inherits every variable definition from the template: type, description, required flag, default and allowed values. The pipeline declares a variable only to override its value, with name and value only. Show the reconciliation banner only when the pipeline's inputs conflict with the template, such as a missing required variable or a value that doesn't match the variable's type. Benefits Consuming pipelines stay lean and hold only real overrides. A new template version which just adds/removes non-required variables does not require all pipelines to redefine the variable definitions. The banner keeps its meaning: when it appears, something needs attention. Workaround considered Reconcile and save every consuming pipeline. Reconciling is a UI action that writes changes back into the pipeline YAML, which for remote pipelines means a git commit per pipeline. We manage templates and pipelines as code, so changes should flow from the repository into Harness, not from the Harness UI back into the repository. Ignore the banner, which teaches users to ignore real problems too.
0
·
Continuous Integration
Load More
→