Skip to content

INCOMPATIBLE: Remove the implementation of the ostree transport #2821

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

Merged
merged 1 commit into from
May 31, 2025

Conversation

mtrmac
Copy link
Collaborator

@mtrmac mtrmac commented Apr 8, 2025

Currently, ostree does not compile:

ostree/ostree_dest.go:115:28: cannot use d (variable of type *ostreeImageDestination) as private.ImageDestinationInternalOnly value in argument to impl.AddCompat: *ostreeImageDestination does not implement private.ImageDestinationInternalOnly (missing method NoteOriginalOCIConfig) (typecheck)
	d.Compat = impl.AddCompat(d)

This has been broken since b941c6b (Nov 18 2024, > 4 months).

Previously:

Overall, it seems extremely likely that noone is using the containers_image_ostree build tag (off by default since March 2019).

So, finally, give up, and delete the code. Most importantly, this allows us to delete the > 3-year-old-frozen dependency, and risky CGo code.


Cc: @giuseppe , @mheon , @rhatdan (general RFC / awareness), @joonas-fi (previously reporting a build failure in #1917 ).

Copy link
Contributor

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Yes, the replacement for ostree is composefs.

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

this was needed for system containers to pull an image to an ostree repo. We don't need it anymore.

LGTM

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

}
//
// Deprecated: The ostree: implementation has been removed, and any attempt to use this transport fails.
var Transport = transports.NewStubTransport("ostree")
Copy link
Member

Choose a reason for hiding this comment

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

What is the point of keeping this? If we don't support any ostree code would not be better to outright cause compile failures for all users? Why would we move all errors to runtime? Sure it break API but removing the actual function already breaks any potential user so I would prefer a proper clean break no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don’t feel strongly about this.

I think there is, in principle, some value to keeping the transport available, because code matching transports,, similar to https://github.com/containers/common/blob/f71a7a6eca1d1c2846e00b2cda013c9b37af7cc5/libimage/pull.go#L237 , can continue to compile for a while; keeping the symbols around reduces the urgency of updating it.

OTOH it is almost certainly a purely hypothetical situation.

Copy link
Member

Choose a reason for hiding this comment

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

Right but I wonder if this not ends up causing more technical debt that way. If nobody updates the places where it is referenced they just end up with defunct code which IMO is worse.

Maybe I do to much rust coding but I like to have changes fail to compile and not find out only at runtime in tests (in the best case) or production (at the worst case) that something changed in an incompatible way.

I don't see any podman references to this the ostree package so I am not that worried about the upgrade path. (I know there are more c/image users so that is an selfish view)
And if things failed to compile already removing it would not make it worse? I guess there is the case about users of the already stub implementation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right but I wonder if this not ends up causing more technical debt that way.

There should be a deprecation warning; i.e. this gives the users choices.


And if things failed to compile already removing it would not make it worse?

Yes. That’s a clear argument for dropping immediately anyway. But then again, we did have an user “only” 2 years ago…

Currently, ostree does not compile:

> ostree/ostree_dest.go:115:28: cannot use d (variable of type *ostreeImageDestination) as private.ImageDestinationInternalOnly value in argument to impl.AddCompat: *ostreeImageDestination does not implement private.ImageDestinationInternalOnly (missing method NoteOriginalOCIConfig) (typecheck)
> 	d.Compat = impl.AddCompat(d)

This has been broken since b941c6b (Nov 18 2024, > 4 months).

Previously:
- 807381f (broken almost 4 months),
- 2e33bf7 (broken > 7 months)

Overall, it seems extremely likely that noone is using the
containers_image_ostree build tag (off by default since March 2019).

So, finally, give up, and delete the code. Most importantly, this allows us
to delete the > 3-year-old-frozen dependency, and risky CGo code.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@mtrmac
Copy link
Collaborator Author

mtrmac commented May 30, 2025

Updated to outright remove the ostree subpackage, per #2821 (comment) (someone might have been using it just for the names, but they would have encountered failures to compile with any recent version).

Also, ostree will no longer be listed in CLI help.

mtrmac added a commit to mtrmac/skopeo that referenced this pull request May 30, 2025
We are not opting into the ostree backend, and it doesn't
build: containers/image#2821 .
So, stop referencing the dependency.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
mtrmac added a commit to mtrmac/libpod that referenced this pull request May 30, 2025
We are not opting into the ostree backend, and it doesn't
build: containers/image#2821 .
So, stop referencing the dependency.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@mtrmac mtrmac changed the title RFC: INCOMPATIBLE: Remove the implementation of the ostree transport INCOMPATIBLE: Remove the implementation of the ostree transport May 30, 2025
Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

@rhatdan
Copy link
Member

rhatdan commented May 31, 2025

/approve
/lgtm

@rhatdan rhatdan merged commit 6cbf339 into containers:main May 31, 2025
10 checks passed
openshift-merge-bot bot pushed a commit to containers/buildah that referenced this pull request Jun 2, 2025
We are not opting into the ostree backend, and it doesn't
build: containers/image#2821 .
So, stop referencing the dependency.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@mtrmac mtrmac deleted the drop-ostree branch June 2, 2025 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants