Skip to content

Conversation

@dmehala
Copy link
Contributor

@dmehala dmehala commented Oct 19, 2023

Resolves #31

@dmehala dmehala requested review from cgilmour and dgoffredo October 19, 2023 12:35
Copy link
Contributor

@dgoffredo dgoffredo left a comment

Choose a reason for hiding this comment

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

Good stuff!

Please see my comments inline. They are mostly of the sort "please add a comment here" or "what does this do?" Overall the changes look good and they certainly work, as we learned debugging the DNS problem.

Comment on lines 2 to 3
# Setup image with nginx if not installed and the corresponding version of
# the nginx-datadog module.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice addition. It's a little hard for me to parse, though. Maybe:

# Set up the nginx container image. Install nginx, if necessary, and install the nginx-datadog module.

Copy link
Contributor

Choose a reason for hiding this comment

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

with wherever that line break wants to go.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 8473561

nginx_modules_path=/usr/lib/nginx/modules
;;
*)
>&2 echo 'Unsupported platform.'
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this exclude?

Also, consider stating in the error message that it's BASE_IMAGE (which might have come from nginx-version-info) that contains the unsupported value.

Copy link
Contributor Author

@dmehala dmehala Oct 20, 2023

Choose a reason for hiding this comment

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

Ditto. Maybe only doing the check in install_datadog.sh is enough. What's docker compose behavior if a service can't be built? What's your thought?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, now I see. This is a little formatting and an added explicit "else" case, which previously was implicitly a no-op.

If docker compose is told to build an image, then failure to build is an error. If it's not told to build an image, than it will use an existing image if one exists, otherwise it's an error.

Adding this check is a good idea -- it probably makes for easier debugging if someone is trying different values for BASE_IMAGE. Consider this wording:

Suggested change
>&2 echo 'Unsupported platform.'
>&2 echo 'BASE_IMAGE value "%s" is invalid. See nginx-version-info.example for more information.' "$BASE_IMAGE"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 8473561

Copy link
Contributor

Choose a reason for hiding this comment

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

ah, my mistake, not yours :)

Please see my more recent comment.

dmehala and others added 3 commits October 20, 2023 11:51
Co-authored-by: David Goffredo <david.goffredo@datadoghq.com>
Co-authored-by: David Goffredo <david.goffredo@datadoghq.com>
Copy link
Contributor

@dgoffredo dgoffredo left a comment

Choose a reason for hiding this comment

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

Fix that echo typo of mine, and this is good to go. Great work.

@dmehala dmehala merged commit 644cc9a into master Oct 26, 2023
@dmehala dmehala deleted the dmehala/arm64-support branch October 26, 2023 21:53
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.

Feature request: arm64 binaries

3 participants