#Engine 0.6.3 breaks docker publish for non OCI supporting registry

1 messages ยท Page 1 of 1 (latest)

limber pawn
#

Specifically https://github.com/dagger/dagger/pull/5365. @normal adder

We are on an Artifactory release < v7 that does not properly support OCI. We have a planned upgrade in a couple of months but right now this change breaks my pipeline and I am not sure what alternatives I have :(. I can keep using 0.6.2 but I won't be able to use any of the new features that Dagger releases from now till end of Aug (hopefully if upgrade goes smoothly). Is there a workaround for this? I get a 400 from Artifactory. I may not be the only person in the same boat. Big companies move slow ๐Ÿ™‚

GitHub

GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 330 million projects.

normal adder
#

Hey @limber pawn, sorry about this! I did a perusal of various registries to confirm OCI support was in place but did not look at Artifactory. Glad to hear it's at least in the more recent versions, but don't want to block you for multiple months.

I think we can pretty easily add an option to use non-oci media types. You may need to wait for the next SDK release in ~2 weeks (unless you're feeling brave/desperate, in which case it's possible to use builds off main) .

Just to double-check, you get these errors when using the Publish api right? As opposed to export and others

limber pawn
#

Hey @normal adder no worries. I wish I saw this before release and I could have asked to test Artifactory :). I can wait for the next release for a fix. There isn't anything very pressing in the current release that I need. Yes, I am referring to the Publish api. I haven't tried export as I don't have a use case for it yet.

#

I don't have any proof that the Artifactory upgrade will fix this. I will know more when we start UAT for the new version.

limber pawn
#

Hey @normal adder do you want me to open an issue for tracking this?

normal adder
limber pawn
limber pawn
#

hey @normal adder . I tested 0.6.4 with the latest Go SDK 0.7.4. I added the DockerMediaTypes to the publish but I am still getting the same 400 ๐Ÿ˜ฆ

normal adder
# limber pawn hey <@949034677610643507> . I tested 0.6.4 with the latest Go SDK 0.7.4. I added...

โ˜น๏ธ Sorry to hear that... I'm not sure why that would be, the behavior when setting DockerMediaTypes should be the old behavior, and I added test coverage for all of that.

I'm kind of stumped so I think I'll most likely just need to try running artifactory, it looks like there is a container image that I could run w/ dagger: https://jfrog.com/help/r/jfrog-installation-setup-documentation/install-artifactory-single-node-with-docker

Can you let me know what exact version your company runs artifactory at currently?

normal adder
normal adder
#

And also, just to be 100% sure we are on the same page, your code for publish looks something like this?

_, err := c.Container().
  From("alpine:3.16.2").
  Publish(ctx, ref, dagger.ContainerPublishOpts{
    MediaTypes: dagger.Dockermediatypes,
  })
limber pawn
#

No worries Eric, let me see if I can find out the exact artifactory version. I am also having a tough time sharing stuff here as my Discord access within my company expired. It was a special permit and I have to re-apply and I don't know how long that will take.

limber pawn
#

We are on Artifactory Enterprise Plus 6.23.25

#

The error I see looks something like this. I'll type out some of it here

.publish failed to solve: failed to push {image}. 
failed commit on ref {ref}: unexpected status from PUT request to {image}: 400
#

I can follow up with some folks I know tomorrow and see if I can get some logs from Artifactory side. It's a bit of a reach but I'll try.

normal adder
normal adder
# limber pawn No worries Eric, let me see if I can find out the exact artifactory version. I a...

Gonna give this a go in a bit, hoping that I can find a docker image for 6.23.25 (or close, it sounds like being <7 is the most important part) that's the "not-enterprise" version ๐Ÿ˜… , or at least the artifacts needed to run it that I can assemble it into an image myself.

Also, I missed this message about discord before, if it's easier to chat on the github issue (https://github.com/dagger/dagger/issues/5433) we can continue the conversation there, makes no difference to me so whatever is easiest for you!

GitHub

What is the issue? We are on Artifactory and since the dagger engine v0.6.3 upgrade we can't push images to Artifactory. We are on Artifactory v6.x. Artifactory v7+ is supposed to support OCI i...

limber pawn
#

Thank you for being so flexible! I don't think it makes a huge difference either way. I can use my personal PC and the phone for discord. If I do have to share code snippets or something like that I can post on the issue.

#

I haven't had much luck getting any logs today. I reached out to a couple of folks but didn't really get an answer.

#

And I'll try to find it but there was an issue in the Artifactory Jira about this OCI support thing. I don't think it's limited to the enterprise version. They only fixed it in V7

normal adder
#

Just to update, I am able to run artifactory container registry at v6.23.25 via docker run --name artifactory -v /var/opt/jfrog/artifactory -d -p 8081:8081 -p 8082:8082 releases-docker.jfrog.io/jfrog/artifactory-jcr:6.23.25, but I very quickly realized that configuring everything is far from trivial and I may not be able to do it unless I sign into jfrog, etc.

So I'm checking on our internal channels if anyone else is available to continue pursuing this since I also need to continue with other dagger development stuff, but either way I'll either find time for it myself or make sure someone else is able to continue, just may not have it fully debugged today

limber pawn
#

Thank you for the update Eric! I did find someone who may be able to look at the logs from Artifactory side. They are very busy and I opened a ticket so hopefully they will get back to me early next week.

#

It's strange that the previous dagger version 0.6.2 works flawlessly. There has to be some other delta besides the image types that Artifactory doesn't like.

normal adder
# limber pawn It's strange that the previous dagger version 0.6.2 works flawlessly. There has ...

Yeah it's quite weird... I am posting more updates in the issue you created, have a few follow-up questions there for you: https://github.com/dagger/dagger/issues/5433#issuecomment-1650158238

GitHub

What is the issue? We are on Artifactory and since the dagger engine v0.6.3 upgrade we can't push images to Artifactory. We are on Artifactory v6.x. Artifactory v7+ is supposed to support OCI i...