Skip to content

Docs main placeholder pr concept#1026

Open
Catalin-Stratulat-Ericsson wants to merge 3 commits into
kptdev:mainfrom
Nordix:docs-main-placeholder-pr-concept
Open

Docs main placeholder pr concept#1026
Catalin-Stratulat-Ericsson wants to merge 3 commits into
kptdev:mainfrom
Nordix:docs-main-placeholder-pr-concept

Conversation

@Catalin-Stratulat-Ericsson

@Catalin-Stratulat-Ericsson Catalin-Stratulat-Ericsson commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Title

Adding concept for main/placeholder PackageRevision


Description

  • What changed: Added a new concept section for the main/placeholder revision
  • Why it’s needed: There is no real explanation of how the main pr works, when its created, why its created, how its updated, why it doesn't rollback to latest-1 if the latest is deleted where main is pointing at
  • How it works: Just refactored the small point mentioning it in the concepts introduction and added a separate section

Related Issue(s)

  • Closes/Fixes #

Type of Change

  • Bug fix
  • New feature
  • Enhancement
  • Refactor
  • Documentation
  • Tests
  • Other: ________

Checklist

  • Code follows project style guidelines
  • Self-reviewed changes
  • Tests added/updated
  • Documentation added/updated
  • All tests and gating checks pass

Testing Instructions (Optional)

  1. just open the netlify preview and look at the new section in the concepts

Additional Notes (Optional)

  • Known issues:
  • Further improvements:
  • Review notes:

AI Disclosure

  • I have used AI in the creation of this PR.

If so, please describe how:

  • E.g. Used Amazon Q Dev to template initial draft of my thoughts on how it operates

Signed-off-by: Catalin-Stratulat-Ericsson <catalin.stratulat@ericsson.com>
Signed-off-by: Catalin-Stratulat-Ericsson <catalin.stratulat@ericsson.com>
Copilot AI review requested due to automatic review settings June 3, 2026 14:49
@netlify

netlify Bot commented Jun 3, 2026

Copy link
Copy Markdown

Deploy Preview for kpt-porch ready!

Name Link
🔨 Latest commit 62b5e98
🔍 Latest deploy log https://app.netlify.com/projects/kpt-porch/deploys/6a298c79c2681d00082ad998
😎 Deploy Preview https://deploy-preview-1026--kpt-porch.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds dedicated documentation for “placeholder package revisions” and updates the Concepts index to link to the new page.

Changes:

  • Added a new concepts doc page describing placeholder package revision behavior, lifecycle, rollback semantics, and GitOps relationship
  • Replaced the inline placeholder description in the concepts index with a relref link + shorter summary

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
docs/content/en/docs/2_concepts/placeholder-package-revision.md New doc page defining placeholder package revisions and explaining lifecycle/usage constraints
docs/content/en/docs/2_concepts/_index.md Replaces long inline placeholder description with a link to the new dedicated doc page

Comment thread docs/content/en/docs/2_concepts/placeholder-package-revision.md
Comment thread docs/content/en/docs/2_concepts/placeholder-package-revision.md
Comment thread docs/content/en/docs/2_concepts/placeholder-package-revision.md
Comment thread docs/content/en/docs/2_concepts/placeholder-package-revision.md
@Catalin-Stratulat-Ericsson Catalin-Stratulat-Ericsson marked this pull request as ready for review June 3, 2026 15:12
@Catalin-Stratulat-Ericsson Catalin-Stratulat-Ericsson added the documentation Improvements or additions to documentation label Jun 10, 2026

Yes. The placeholder is **not immutable**. It can be deleted via `porchctl` like any other PackageRevision. This is useful during package cleanup (e.g. removing a package entirely from a repository).

Deleting the placeholder does **not** affect the underlying Git branch content.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it not? I thought that deleting the placeholder removes it from the main branch.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes you are right. i was under the impression that the latest tag PR is what decides this and its removal means content in main is removed. tested and it is as you say the main is what dictates this. i will reformat


## Restrictions

The placeholder cannot be used as a source for certain operations:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these actually enforced?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes they are i believe i just checked them (at least at the cli level, unsure about api). Haven't checked upgrade yet but clone and copy seem fine

Copy:

catalin@E-5CG2302VDX:~/Nephio/2026/11-test/porch$ porchctl rpkg copy example-repository.demo-package.main --workspace=example-workspace-2 --namespace=example-namespace
Error: Internal error occurred: source revision may not be the placeholder package revision example-repository/example-repository.demo-package.main

Clone:

catalin@E-5CG2302VDX:~/Nephio/2026/11-test/porch$ porchctl rpkg clone example-repository.demo-package.main demo-package-2 --repository=test-blueprints --workspace=example-workspace-2 --namespace=example-namespace
Error: Internal error occurred: source revision may not be the placeholder package revision example-repository/example-repository.demo-package.main

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - the checks are at the level of applying the tasks, so they cover the API as well.

| Subsequent revision published | Placeholder **updated** to new content |
| Published revision deleted | Placeholder **unchanged** (no rollback) |
| Placeholder itself deleted | Removed from Porch (Git branch unaffected) |
| New revision published after placeholder deletion | Placeholder **recreated** |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

created with contents of the new version

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will amend

@sonarqubecloud

Copy link
Copy Markdown

* its naming comvention is `{repository-name}.{package-name}.{branch-name}`, where {branch-name} is the branch in Git
on which the package revision exists
* ***[Placeholder package revision]({{% relref "placeholder-package-revision" %}})***: A package revision that tracks
the content of a package's configured Git branch (typically `main`). It is created automatically when the first revision

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
the content of a package's configured Git branch (typically `main`). It is created automatically when the first revision
the most recent content of a package in its repository. It is created automatically when the first revision

type: docs
weight: 4
description: |
The placeholder package revision tracks the configured Git branch for a package. This page explains its behaviour, lifecycle interactions, and how it relates to GitOps workflows.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The placeholder package revision tracks the configured Git branch for a package. This page explains its behaviour, lifecycle interactions, and how it relates to GitOps workflows.
The placeholder package revision tracks the most recent content of a package in its repository. This page explains its behaviour, lifecycle interactions, and how it relates to GitOps workflows.


## Overview

The placeholder package revision is a special PackageRevision that Porch creates automatically to represent the state of a package on its configured Git branch. It acts as a "branch-tracking" reference, always reflecting the content of the most recently published revision.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The placeholder package revision is a special PackageRevision that Porch creates automatically to represent the state of a package on its configured Git branch. It acts as a "branch-tracking" reference, always reflecting the content of the most recently published revision.
The placeholder package revision is a special PackageRevision that Porch creates automatically as a reference the latest released version of a package. It acts as a "branch-tracking" reference. The placeholder package revision points at the version of the package revision at the HEAD of the branch of the repository that the package revision is stored on.

| Naming convention | `{repository-name}.{package-name}.{branch-name}` |
| Lifecycle | `Published` |

There is always at most one placeholder package revision per package.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
There is always at most one placeholder package revision per package.
There is one and only one placeholder package revision per package.

1. Publish v1 (revision 1): placeholder is **created** with v1's content
2. Publish v2 (revision 2): placeholder is **updated** with v2's content

The placeholder **only moves forward** through explicit publish operations.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The placeholder **only moves forward** through explicit publish operations.
The placeholder **only moves forward** on each explicit publish operations.


The placeholder **only moves forward** through explicit publish operations.

## What Happens When a Revision Is Deleted?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## What Happens When a Revision Is Deleted?
## What Happens When the Latest Package Revision Is Deleted?


## What Happens When a Revision Is Deleted?

Deleting a published revision (even if it is the latest) does **not** cause the placeholder to roll back to a previous revision. The placeholder retains the content it had at the time of the last publish.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Deleting a published revision (even if it is the latest) does **not** cause the placeholder to roll back to a previous revision. The placeholder retains the content it had at the time of the last publish.
Deleting the latest published package revision does **not** cause the placeholder to roll back to a previous revision. The placeholder retains the content it had at the time of the last publish. It still refers to the version of the Package Revision at the HEAD of the branch in git.


## Relationship to GitOps

In a GitOps workflow, a reconciler (such as Flux or ArgoCD) watches a branch in Git for changes. The placeholder package revision corresponds directly to this branch.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In a GitOps workflow, a reconciler (such as Flux or ArgoCD) watches a branch in Git for changes. The placeholder package revision corresponds directly to this branch.
In a GitOps workflow, a reconciler (such as Flux or ArgoCD) watches a branch in Git for changes. The placeholder package revision references this branch.

| First revision published | Placeholder **created** |
| Subsequent revision published | Placeholder **updated** to new content |
| Published revision deleted | Placeholder **unchanged** (no rollback) |
| Placeholder itself deleted | Removed from Porch (Git branch unaffected) |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See @nagygergo comments earlier.


## Restrictions

The placeholder cannot be used as a source for certain operations:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - the checks are at the level of applying the tasks, so they cover the API as well.


- **Clone**: cannot clone from a placeholder
- **Edit/Copy**: cannot edit or copy a placeholder
- **Upgrade**: cannot upgrade to or from a placeholder

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Upgrade**: cannot upgrade to or from a placeholder
- **Upgrade**: cannot upgrade a placeholder or use a placeholder as the target upstream of an upgrade

(using a placeholder as the source upstream is already ruled out by not being able to clone a placeholder)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants