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

Update the base image for ci-build's Dockerfile #2674

Merged
merged 10 commits into from
Sep 7, 2023

Conversation

ysaito1001
Copy link
Contributor

@ysaito1001 ysaito1001 commented May 5, 2023

Motivation and Context

The PR will be a draft until #2675 is merged into main. Once that's merged, this PR can remove the change to Cargo.toml in aws-smithy-client.

Now that it's passed tests in CI, ysaito1001 will merge this PR once it has passed the internal tests

Fixes #2500.

Description

This PR updates the base image for ci-build's Dockerfile as the latest image for amazonlinux has been updated to 2023.

As part of it, the changes to Dockerfile include

  • Fixing conflicting curl's libraries by specifying --allowerasing
    Without it, we'd get an error as follows:
package curl-minimal-7.88.1-1.amzn2023.0.1.x86_64 conflicts with curl provided by curl-7.87.0-2.amzn2023.0.2.x86_64
  • Adding perl explicitly as a new version of openssl now requires it
    Without perl, we'd get an error as follows:
Step 24/48 : RUN cargo +${rust_nightly_version} -Z sparse-registry install cargo-deny --locked --version ${cargo_deny_version}
 ---> Running in 3c3431881cfa
...
error: failed to run custom build command for `openssl-sys v0.9.76`
...
  --- stderr
  Can't locate FindBin.pm in @INC (you may need to install the FindBin module) (@INC contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at ./Configure line 15.
  BEGIN failed--compilation aborted at ./Configure line 15.
  thread 'main' panicked at '

Also, there is a change to Cargo.toml in aws-smithy-client:

  • Forcing aws-smithy-client with native-tls feature to use a more recent openssl-sys crate
    Without it, cargo minimal-versions check would fail in aws-smithy-client trying to build openssl-sys v0.9.39 where OpenSSL in a container is more up-to-date, leading to a build failure (See this issue for more details)

Finally, updating CI for Run Tests on Windows

  • Manually installing openssl as suggested. Without it, after introducing a more recent openssl 0.10.52 dev-dependencies in aws-smithy-client, we'd get this on Windows:
  --- stderr
  thread 'main' panicked at '

  Could not find directory of OpenSSL installation, and this `-sys` crate cannot
  proceed without this knowledge. If OpenSSL is installed and this crate had
  trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
  compilation process.

  Make sure you also have the development packages of openssl installed.
  For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.

  If you're in a situation where you think the directory *should* be found
  automatically, please open a bug at https://github.com/sfackler/rust-openssl
  and include information about your system as well as this message.

  $HOST = x86_64-pc-windows-msvc
  $TARGET = x86_64-pc-windows-msvc
  openssl-sys = 0.9.90

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This commit adds a dependency on `openssl` to force a more recent
`openssl-sys` crate to be brought in. Without it,
`cargo minimal-versions check` on `aws-smithy-client` with `native-tls`
enabled would fail in a container whose base image is `amazonlinux:2023`
due to the old `openssl-sys` v0.9.39 trying to build OpenSSL 3.0.8, which
would not work. See sfackler/rust-openssl#1724.
@github-actions
Copy link

github-actions bot commented May 5, 2023

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@github-actions
Copy link

github-actions bot commented Jul 6, 2023

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@github-actions
Copy link

github-actions bot commented Jul 6, 2023

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@ysaito1001 ysaito1001 marked this pull request as ready for review July 6, 2023 20:41
@ysaito1001 ysaito1001 requested review from a team as code owners July 6, 2023 20:41
@github-actions
Copy link

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

1 similar comment
@github-actions
Copy link

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@github-actions
Copy link

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@github-actions
Copy link

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@github-actions
Copy link

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@ysaito1001 ysaito1001 added this pull request to the merge queue Sep 7, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Sep 7, 2023
@ysaito1001 ysaito1001 added this pull request to the merge queue Sep 7, 2023
Merged via the queue into main with commit 8a3b8f3 Sep 7, 2023
41 checks passed
@ysaito1001 ysaito1001 deleted the ysaito/upgrade-base-image-for-dockerfile branch September 7, 2023 01:40
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.

Update the base Docker image for ci-build
2 participants