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

Adjust the servers to be always linux instances #25172

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Juanadelacuesta
Copy link
Member

@Juanadelacuesta Juanadelacuesta commented Feb 20, 2025

Description

Becase there is not many OS specific behaviour on the servers code, they can always be run on linux instances, this PR introduces that change and fixes some errors in the update of the last server.

Testing & Reproduction steps

Links

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
  • Documentation If the change impacts user-facing functionality such as the CLI, API, UI,
    and job configuration, please update the Nomad website documentation to reflect this. Refer to
    the website README for docs guidelines. Please also consider whether the
    change requires notes within the upgrade guide.

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.

@@ -142,16 +145,16 @@ scenario "upgrade" {
Bring the new upgraded binary from the artifactory to the instance running enos.
EOF
Copy link
Member

Choose a reason for hiding this comment

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

This description is no longer true as far as I can tell. It doesn't download the binary.

Comment on lines 12 to 26
module fetch_artifact {
for_each = toset(distinct(var.oss))
source = "../fetch_artifactory"

artifactory_username = var.artifactory_username
artifactory_token = var.artifactory_token
artifactory_host = var.artifactory_host
artifactory_repo = var.artifactory_repo
edition = var.edition
os = each.value
product_version = var.product_version
arch = var.arch
download_binary = var.download_binaries
download_binary_path = "${var.download_binaries_path}/${each.value}"
}
Copy link
Member

Choose a reason for hiding this comment

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

Calling this module install_binaries is really confusing me. If download_binary = true, it only downloads the binaries locally and doesn't install them anywhere. If download_binaries = false, then as far as I can tell the only thing it does is expose the outputs from data.eno_artifactory_item.nomad.

It seems like the only reason this module exists is to handle the for_each on var.oss. Maybe we can push that down into fetch_artifactory instead and avoid having to come up with a name here?

Copy link
Member Author

Choose a reason for hiding this comment

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

the logic to get the correct url for each binary is not trivial, and it will probably grow, I think we can benefit from having it in its own module

Copy link
Member

@tgross tgross Feb 21, 2025

Choose a reason for hiding this comment

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

Ok, no problem. let's merge this and we can iterate as we extend this. Can we at least change the name though?

tgross
tgross previously approved these changes Feb 21, 2025
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM!

tgross added a commit that referenced this pull request Feb 21, 2025
While testing #25172 I found a few spots where #25152 wasn't capturing the
errors from transient failures correctly or exiting early instead of
retrying.

Ref: https://hashicorp.atlassian.net/browse/NET-11546
@tgross tgross added this to the 1.10.0 milestone Feb 21, 2025
@tgross tgross added the theme/testing Test related issues label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/testing Test related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants