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

fix: unable to close, unable to unref last: unable to cleanup component version, while unref last: closing component version #1243

Merged
merged 6 commits into from
Jan 14, 2025

Conversation

hilmarf
Copy link
Member

@hilmarf hilmarf commented Jan 10, 2025

What this PR does / why we need it

When calling ocm-cli with oci-tag-version like 0.0.1-20250108132333.build-af79499 e.g.

ocm get cv ocm-oci-test.int.repositories.cloud.sap//docker.io/recmo/docker-hello-tiny:0.0.1-20250108132333.build-af79499

It fails during the finalize step, when doing an update, where another round of version comparison happens.

Which issue(s) this PR fixes

Fixes: #1235

Related: #355

@hilmarf hilmarf requested a review from a team as a code owner January 10, 2025 15:20
@hilmarf hilmarf added this to the 2025-Q1 milestone Jan 10, 2025
@github-actions github-actions bot added the size/xs Extra small label Jan 10, 2025
@hilmarf hilmarf changed the title fixes: https://github.com/open-component-model/ocm/issues/1235 fixes(#1235): unable to close, unable to unref last: unable to cleanup component version, while unref last: closing component version Jan 10, 2025
@hilmarf hilmarf added the kind/bugfix Bug label Jan 10, 2025
@hilmarf hilmarf changed the title fixes(#1235): unable to close, unable to unref last: unable to cleanup component version, while unref last: closing component version fix(#1235): unable to close, unable to unref last: unable to cleanup component version, while unref last: closing component version Jan 10, 2025
@hilmarf hilmarf changed the title fix(#1235): unable to close, unable to unref last: unable to cleanup component version, while unref last: closing component version fix(1235): unable to close, unable to unref last: unable to cleanup component version, while unref last: closing component version Jan 10, 2025
@hilmarf hilmarf changed the title fix(1235): unable to close, unable to unref last: unable to cleanup component version, while unref last: closing component version fix: unable to close, unable to unref last: unable to cleanup component version, while unref last: closing component version Jan 10, 2025
Skarlso
Skarlso previously approved these changes Jan 11, 2025
Copy link
Contributor

@mandelsoft mandelsoft left a comment

Choose a reason for hiding this comment

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

The technical version used at the backend should not be usable as OCM version (see my comment above). I would strongly recommend to provide an error instead of introducing this ambiguity.

@hilmarf hilmarf added the dev/second-opinion PR or issue needs a second opinion, is open for discussion label Jan 13, 2025
which has been replaced by META_SEPARATOR to create OCI compliant tag
@github-actions github-actions bot added size/s Small and removed size/xs Extra small labels Jan 14, 2025
Copy link
Contributor

@jakobmoellerdev jakobmoellerdev left a comment

Choose a reason for hiding this comment

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

With the warning in place, we should be good to go not to break anyone while at the same time preparing to forbid this alltogether like suggested. For now, we need to avoid completely breaking here.

@hilmarf hilmarf enabled auto-merge (squash) January 14, 2025 13:05
@hilmarf hilmarf dismissed mandelsoft’s stale review January 14, 2025 13:06

checked with Jakob

@hilmarf hilmarf merged commit f0103a8 into open-component-model:main Jan 14, 2025
23 checks passed
@hilmarf hilmarf deleted the fixes/unref_last branch January 14, 2025 13:13
hilmarf added a commit to hilmarf/ocm that referenced this pull request Jan 14, 2025
…nt version, while unref last: closing component version (open-component-model#1243)

#### What this PR does / why we need it

When calling ocm-cli with oci-tag-version like
`0.0.1-20250108132333.build-af79499` e.g.

```bash
ocm get cv ocm-oci-test.int.repositories.cloud.sap//docker.io/recmo/docker-hello-tiny:0.0.1-20250108132333.build-af79499
```

It fails during the [finalize
step](https://github.com/open-component-model/ocm/blob/releases/v0.19/api/utils/refmgmt/refcloser.go#L196),
when [doing an
update](https://github.com/open-component-model/ocm/blob/releases/v0.19/api/ocm/extensions/repositories/genericocireg/componentversion.go#L171),
where [another round of version
comparison](https://github.com/open-component-model/ocm/blob/releases/v0.19/api/ocm/extensions/repositories/genericocireg/componentversion.go#L99)
happens.

#### Which issue(s) this PR fixes

Fixes: open-component-model#1235

Related: open-component-model#355
hilmarf added a commit that referenced this pull request Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev/second-opinion PR or issue needs a second opinion, is open for discussion kind/bugfix Bug size/s Small
Projects
Status: 🍺 Done
Development

Successfully merging this pull request may close these issues.

Bug: + in component version is replaced by .build-
4 participants