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

Migrate off storing BackendName in Docker labels #793

Conversation

michaelsilver
Copy link
Contributor

Instead of storing a label like:

  • "dev.plane.backend": "xjbgb03bhfxqgp"

We will now store a label like:

  • "dev.plane.backend": "true"

Critically, this allows us to continue relying on
"dev.plane.backend" as an identifier for plane backends, while deprecating the reliance on that label for carrying the BackendName.

The only place we relied on the BackendName carried by this label was in the events loop, where as it turns out docker already applies a "name" attribute to events.

Otherwise, introduce some helper functions to idiomatically convert between ContainerId and BackendName.

Copy link

vercel bot commented Jul 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
plane ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 24, 2024 8:17pm

Copy link
Member

@rolyatmax rolyatmax left a comment

Choose a reason for hiding this comment

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

Nice! Happy you were able to make plane work with just static labels!

Copy link
Member

@paulgb paulgb left a comment

Choose a reason for hiding this comment

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

LGTM but let's discuss before landing re. some other implications.

Instead of storing a label like:
 - "dev.plane.backend": "xjbgb03bhfxqgp"

We will now store a label like:
 - "dev.plane.backend": "true"

Critically, this allows us to continue relying on
`"dev.plane.backend"` as an _identifier_ for plane backends, while
deprecating the reliance on that label for carrying the `BackendName`.

The only place we relied on the `BackendName` carried by this label
was in the events loop, where as it turns out docker already applies a
`"name"` attribute to events.

Otherwise, introduce some helper functions to idiomatically convert
between `ContainerId` and `BackendName`.
@michaelsilver michaelsilver force-pushed the michael/dis-2323-plane-migrate-off-using-docker-labels-to-identify-backends branch from a34a08f to 3ce9c9d Compare July 24, 2024 19:42
Copy link
Member

@paulgb paulgb left a comment

Choose a reason for hiding this comment

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

Thanks for the log collector fix.

@michaelsilver michaelsilver merged commit 7336dd9 into main Jul 25, 2024
6 checks passed
@michaelsilver michaelsilver deleted the michael/dis-2323-plane-migrate-off-using-docker-labels-to-identify-backends branch July 25, 2024 18:06
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.

3 participants