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

[BUG]: Docker images for unreleased version are built and published as released ones (without SNAPSHOT classifier) #5188

Open
reta opened this issue Nov 15, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@reta
Copy link
Contributor

reta commented Nov 15, 2024

Describe the bug

As of today, the Docker images for unreleased OpenSearch version (fe 3.0.0, 2.18.1, 2.19.0) are published as released ones, fe for most recent opensearchstaging/opensearch:2.18.1 image:

{
  "name" : "55ffbb67e420",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "Fp3oruNUSByQxuH0sF5L4w",
  "version" : {
    "distribution" : "opensearch",
    "number" : "2.18.1",
    "build_type" : "tar",
    "build_hash" : "1ddb631d77ea96991d3566c54bb7a1be5534fb4a",
    "build_date" : "2024-11-13T01:21:35.441188072Z",
    "build_snapshot" : false,
    "lucene_version" : "9.12.0",
    "minimum_wire_compatibility_version" : "7.10.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "The OpenSearch Project: https://opensearch.org/"
}

To reproduce

$ docker run -p 9200:9200  -e "discovery.type=single-node"  -e OPENSEARCH_INITIAL_ADMIN_PASSWORD=__adm0iN__ opensearchstaging/opensearch:2.18.1

$ curl https://localhost:9200 -kv -u admin:__adm0iN__

Expected behavior

The build_snapshot should have indicated that this is a snapshot build, not a release

Screenshots

If applicable, add screenshots to help explain your problem.

Host / Environment

Any

Additional context

See please opensearch-project/OpenSearch#16581

Relevant log output

No response

Acceptance Criteria

  • Create docker image opensearchstaging/opensearch-min:3.0.0-SNAPSHOT
  • Add a stage to create docker image as part of min distribution publish workflow
  • (Optional) Create docker image for bundled distribution with snapshots build
@reta reta added bug Something isn't working untriaged Issues that have not yet been triaged labels Nov 15, 2024
@reta
Copy link
Contributor Author

reta commented Nov 15, 2024

@peterzhuamazon would really appreciate your input / help with that, thanks!

@peterzhuamazon
Copy link
Member

This is by design as it is within the opensearchstaging repo, not opensearchproject.
Only opensearchproject is the public released official images.

@peterzhuamazon
Copy link
Member

The reason we dont use SNAPSHOT is also by design for everything on ci.opensearch.org as we can quickly make a release candidate become a real release version.

Only the snapshots dir on artifacts.opensearch.org is actually using SNAPSHOT postfix and -Dsnapshot=true parameter as that is more of a leftover in early design choices.

Thanks.

@peterzhuamazon
Copy link
Member

Tho, I am not against having another SNAPSHOT tagged images but those will only have core + core plugins, no other plugins such as knn or alerting.

@peterzhuamazon
Copy link
Member

But I do want to know the use case of this and whether it is necessary.

@reta
Copy link
Contributor Author

reta commented Nov 15, 2024

But I do want to know the use case of this and whether it is necessary.

This is directly related to #5096:

  • we publish distribution and plugins as SNAPSHOTs, but ..
  • we publish their Docker images as releases

The plugin installation does not work either, fe installing any plugin in Docker container fails, and for the right reasons - there are no releases for the plugins. And because the build is a release build, the tooling does not look for SNAPSHOTs either.

@peterzhuamazon
Copy link
Member

peterzhuamazon commented Nov 15, 2024

But I do want to know the use case of this and whether it is necessary.

This is directly related to #5096:

* we publish distribution and plugins as SNAPSHOTs, but ..

* we publish their Docker images as releases

The plugin installation does not work either, fe installing any plugin in Docker container fails, and for the right reasons - there are no releases for the plugins. And because the build is a release build, the tooling does not look for SNAPSHOTs either.

So a SNAPSHOT Min artifact creation followed by a SNAPSHOT docker image creation with only core-plugins core is enough?
If that is the case it might be easy to pick up.

@reta
Copy link
Contributor Author

reta commented Nov 15, 2024

So a SNAPSHOT Min artifact creation followed by a SNAPSHOT docker image creation with only core-plugins core is enough?

Do we build Docker images out of SNAPSHOT min distribution? If yes - 100% enough.

@peterzhuamazon
Copy link
Member

So a SNAPSHOT Min artifact creation followed by a SNAPSHOT docker image creation with only core-plugins core is enough?

Do we build Docker images out of SNAPSHOT min distribution? If yes - 100% enough.

Yes, as of now a opensearchstaging/opensearch:3.0.0 will use the distribution build of 3.0.0 tarball to generate an image.

Similarly if we would add another SNAPSHOT image it would have to be built out of min snapshot, which would result into a opensearchstaging/opensearch-min:3.0.0-SNAPSHOT if that make sense to you.

@reta
Copy link
Contributor Author

reta commented Nov 15, 2024

Similarly if we would add another SNAPSHOT image it would have to be built out of min snapshot, which would result into a opensearchstaging/opensearch-min:3.0.0-SNAPSHOT if that make sense to you.

Totally, I think it would be also fair to publish non-released versions as SNAPSHOTs

@gaiksaya
Copy link
Member

gaiksaya commented Nov 15, 2024

I believe these are nightly non-snapshot builds. Similar to what we have even for plugins at ci.opensearch.org.
For "SNAPSHOT" version, we would need to build all distributions including tarball (responsible for docker creation) with param SNAPSHOT=true.

As of today we only build min snapshot with SNAPSHOT=true. The reason being arm64 github runners unavailability on GHA. For all independent plugins and opensearch artifacts, snapshot version is build and published to maven using GHA in the respective repos. Wondering if we need to build snapshots at the distribution level.

@gaiksaya gaiksaya removed the untriaged Issues that have not yet been triaged label Nov 15, 2024
@reta
Copy link
Contributor Author

reta commented Nov 15, 2024

For "SNAPSHOT" version, we would need to build all distributions including tarball (responsible for docker creation) with param SNAPSHOT=true.

👍 , thanks @gaiksaya , it looks right to me (since we are building the SNAPSHOT versions indeed), the current SNAPSHOT-as-release is quite confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

3 participants