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

OBS-144: Migrate from socorro-release to obs-common #245

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

relud
Copy link
Member

@relud relud commented Nov 18, 2024

and from make to just

also switch to using docker-compose.override.yml for volume mounts, so they can be disabled in CI.

@relud relud requested a review from a team as a code owner November 18, 2024 20:13
@relud relud force-pushed the relud-obs-common-and-just branch 2 times, most recently from ddf75c8 to 5d1cbe2 Compare November 18, 2024 20:19
@smarnach smarnach self-assigned this Nov 19, 2024
Copy link
Contributor

@smarnach smarnach left a comment

Choose a reason for hiding this comment

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

Looks good to me!

In general, I'd prefer to have separate PRs for separate changes, since it makes the Git history more useful when trying to figure out when something changed and for what reason. I think it's fine here, and it's not worth the effort to try and factor this into separate, independent commits, so this is just a general remark.

We need some updates to the documentation as well. We should probably add a link to https://just.systems/ somewehere, update all references to make, and update references to the scripts now provided by obs-common.

I think this PR should also remove the scripts replaced by obs-common from this repo.

justfile Outdated

# Stop and remove docker containers and artifacts.
clean:
docker compose rm -f
Copy link
Contributor

Choose a reason for hiding this comment

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

Running docker compose rm only removes containers, but not networks, containers and images. Should we rename down to clean instead?

Networks specifically can be a problem on Linux, since they create entries in the routing table that often conflict with random wifi networks, so I generally want down rather than just rm to clean things up. (The first time I ran into this was on a German train. The wifi on German trains uses a 172.x.0.0/16 network, and so does Docker, and they often conflict, with the result that you can connect to the wifi, but no IP packets are ever sent there. This wasn't easy to debug.)

Copy link
Member Author

@relud relud Nov 19, 2024

Choose a reason for hiding this comment

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

I think I should make clean do docker compose down, but I would like to also keep down as a separate command, and add more things to clean, like this line from docs:

docker compose run --rm --no-deps eliot bash make -C docs/ clean

docker compose --progress plain build {{args}}

# Run the webapp and services.
run *args='--attach=eliot --attach=fakesentry eliot': _env
Copy link
Contributor

Choose a reason for hiding this comment

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

It's confusing that the target running docker compose up is called run. Most other targets are named according to the Docker Compose command they run. Moreover, there's also docker compose run, which does something else. I'm not sure we should actually change this, since this has always been called run. I mainly want to hear what you think. :)

(There's also docker compose start, which is similar to docker compose up, except less useful in completely unclear ways. I like that we don't have a just target for that.)

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's a great idea to rename these just commands to just up and just run to match docker compose

Copy link
Member Author

Choose a reason for hiding this comment

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

per discussion in zoom, only just run should be moved to just up, and we'll keep just shell

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm going to file this change as a separate PR so willkg can have a chance to comment on it as well

docker compose up {{args}}

# Stop service containers.
stop *args:
Copy link
Contributor

Choose a reason for hiding this comment

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

just stop is a very satisfying command to type into a shell.

@smarnach
Copy link
Contributor

Forgot to mention this explicitly: I tested all just targets manually on my Ubuntu machine, and everything appears to be working fine.

@relud
Copy link
Member Author

relud commented Nov 19, 2024

We need some updates to the documentation as well. We should probably add a link to https://just.systems/ somewhere, update all references to make,

I've updated dev.rst, which was the only place I found references to make.

and update references to the scripts now provided by obs-common.

I didn't find any references to the 4 scripts moved to obs-common: bin/license-check.py bin/release.py bin/sentry-wrap.py bin/service-status.py, except the use of license-check in bin/run_lint.sh which had already been updated.

I think this PR should also remove the scripts replaced by obs-common from this repo.

done

@relud relud enabled auto-merge November 19, 2024 16:56
@relud relud added this pull request to the merge queue Nov 19, 2024
Merged via the queue into main with commit a49d813 Nov 19, 2024
1 check passed
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.

2 participants