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

don't set /etc/hosts in CI #1729

Merged
merged 6 commits into from
May 29, 2023
Merged

don't set /etc/hosts in CI #1729

merged 6 commits into from
May 29, 2023

Conversation

pmeier
Copy link
Member

@pmeier pmeier commented Apr 14, 2023

What does this implement/fix?

There are basically two scenarios:

  1. We have domain and can set the DNS. In that case there is no need to set /etc/hosts since the DNS is handling it for us
  2. We don't have a domain. In that case setting /etc/hosts is not enough. See [BUG] - Installing nebari locally (local with kind) fails. #1703 (comment) and [BUG] - local deploy cannot guaranteed be done without having access to a domain #1707.

Thus, there is no need to set it at all. This PR removes it from CI to see if anything breaks (it shouldn't). If we move forward here, we also need to send a PR to the docs and remove that section there.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • Did you test the pull request locally?
  • Did you add new tests?

@pmeier
Copy link
Member Author

pmeier commented Apr 21, 2023

It seems github-actions.nebari.dev

sudo echo "172.18.1.100 github-actions.nebari.dev" | sudo tee -a /etc/hosts

does not resolve and thus our k8s tests are failing here:

>>> import socket
>>> socket.gethostbyname("github-actions.nebari.dev")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known

However, this actually means that our k8s tests are not sufficient: as explained in 2. above, it is not sufficient to fix /etc/hosts for the cluster to work correctly. Since our tests are green normally, this indicates that we don't check thoroughly.

@costrouc can we have an A record for github-actions.nebari.dev that points to 172.18.1.100? As explained in #1707 that is not 100% safe, but should work in our setup. I'll expand the current tests to also check the case with no domain with the fix for #1707.

@pavithraes pavithraes added type: maintenance 🛠 Day-to-day maintenance tasks status: in progress 🏗 This task is currently being worked on labels Apr 24, 2023
@iameskild
Copy link
Member

Hey @pmeier, is this still a WIP?

@pmeier pmeier marked this pull request as ready for review May 1, 2023 17:41
@costrouc
Copy link
Member

costrouc commented May 2, 2023

@pmeier I've added github-actions.nebari.dev to our dns. I'll retrigger the dns.

@pmeier
Copy link
Member Author

pmeier commented May 2, 2023

We have some failures although the DNS now points to the address of the load balancer: https://github.com/nebari-dev/nebari/actions/runs/4861477270/jobs/8666565311?pr=1729#step:11:5906

@pmeier pmeier requested a review from costrouc May 10, 2023 08:54
@pmeier pmeier added needs: review 👀 This PR is complete and ready for reviewing area: CI/CD 👷🏽‍♀️ and removed type: maintenance 🛠 Day-to-day maintenance tasks status: in progress 🏗 This task is currently being worked on labels May 24, 2023
@pmeier pmeier changed the title don't set /etc/hosts don't set /etc/hosts in CI May 24, 2023
Copy link
Member

@costrouc costrouc left a comment

Choose a reason for hiding this comment

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

Yeah let's remove this since like you said this doesn't actually do anything within the Kubernetes deployment.

@costrouc costrouc merged commit 78faf03 into develop May 29, 2023
@costrouc costrouc deleted the etc-hosts branch May 29, 2023 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: CI/CD 👷🏽‍♀️ needs: review 👀 This PR is complete and ready for reviewing
Projects
Development

Successfully merging this pull request may close these issues.

5 participants