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(docker): support non amd64 dockerize in setup containers #7091

Merged
merged 10 commits into from
Jan 23, 2023

Conversation

tonycsoka
Copy link
Contributor

@tonycsoka tonycsoka commented Jan 20, 2023

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

This fixes an issue where the amd64 binary version of dockerize was being used to start the mysql-setup and elasticsearch-setup containers, regardless of the architecture of image being being, causing datahub docker quickstart to fail on arm64. Instead, this fix builds dockerize in a staged build, and uses the resultant binary in the final image. Tried first by downloading the gzipped Source asset from the dockerize repo, but this did not include all needed files for a build, hence going for a git clone solution.

@github-actions github-actions bot added the devops PR or Issue related to DataHub backend & deployment label Jan 20, 2023
@pedro93
Copy link
Collaborator

pedro93 commented Jan 20, 2023

Hello @tonycsoka

First of all, thank you for making a contribution to DataHub! We appreciate folks who actively try to improve the project.

Second, for this PR to be accepted could you please update the PR title and description to match our guidelines? See here: https://github.com/datahub-project/datahub/blob/master/docs/CONTRIBUTING.md#commit-message-format

In order to ensure your PR gets merged we would highly recommend adding a description to your PR that describes the problem you are trying to solve, how did you did it and any considerations reviewers and/or users of this feature may need to have.

@tonycsoka tonycsoka changed the title Arm64 docker fix(docker): support non amd64 dockerize in setup containers Jan 20, 2023
@tonycsoka
Copy link
Contributor Author

Hello @tonycsoka

First of all, thank you for making a contribution to DataHub! We appreciate folks who actively try to improve the project.

Second, for this PR to be accepted could you please update the PR title and description to match our guidelines? See here: https://github.com/datahub-project/datahub/blob/master/docs/CONTRIBUTING.md#commit-message-format

In order to ensure your PR gets merged we would highly recommend adding a description to your PR that describes the problem you are trying to solve, how did you did it and any considerations reviewers and/or users of this feature may need to have.

Thanks @pedro93, how's that for you.


ENV GO111MODULE=on
RUN go mod tidy
RUN go install
Copy link
Contributor

Choose a reason for hiding this comment

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

go install github.com/jwilder/dockerize@latest

might be simpler

Copy link
Collaborator

Choose a reason for hiding this comment

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

For consistent behaviour please take the dockerize version to a well tested version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorted on the branch, not too familiar with the suggestion from @szalai1 as I'm a go virgin, but for now it'll grab the specified tag

Copy link
Contributor

Choose a reason for hiding this comment

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

@tonycsoka , you don't need to clone and run all those commands to set up and build the binary, you can just run go install packagename@version and it will install it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pedro93 OK, hopefully that should be it, moved directly to go install github.com/jwilder/dockerize@... as per @szalai1

@pedro93
Copy link
Collaborator

pedro93 commented Jan 20, 2023

@tonycsoka did you try Peter's suggestion with go install github.com/jwilder/dockerize@latest rather than git cloning a repo?

@tonycsoka
Copy link
Contributor Author

@tonycsoka did you try Peter's suggestion with go install github.com/jwilder/dockerize@latest rather than git cloning a repo?

Not yet, there's a little issue in that v0.6.1 of dockerize used this system called glock for dependency management which I'm looking at

Copy link
Collaborator

@pedro93 pedro93 left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for taking care of the review concerns. Once CI is green I think we can merge this.

@tonycsoka
Copy link
Contributor Author

LGTM! Thank you for taking care of the review concerns. Once CI is green I think we can merge this.

Great and have a fine weekend!

@tonycsoka
Copy link
Contributor Author

LGTM! Thank you for taking care of the review concerns. Once CI is green I think we can merge this.

@pedro93 Are those smoke tests a little delicate, can't see why this change would cause an issue and we have 2 different failures on separate CI runs?

@pedro93 pedro93 merged commit 1149cea into datahub-project:master Jan 23, 2023
@pedro93
Copy link
Collaborator

pedro93 commented Jan 23, 2023

Yes our tests are a little flaky sometimes when big changes to the UI happen. CI was failing due to another issue that got fixed since. Merged your PR. Thank you for the contribution!

@tonycsoka tonycsoka deleted the arm64-docker branch January 23, 2023 10:37
ericyomi pushed a commit to ericyomi/datahub that referenced this pull request Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops PR or Issue related to DataHub backend & deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants