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

Managed Deployments: Groups and Releases #1653

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nshoes
Copy link
Contributor

@nshoes nshoes commented Nov 20, 2024

This work contains two sets of changes: the creation of DeploymentReleases and the renaming of deployments to deployment_groups. DeploymentRelease integration will be done in the next body of work for managed deploys, this PR has become too big to add any more functionality.

So many things have been renamed that it's easier to list what hasn't been renamed:

  • deployments table name
  • any indexes with deployments in the name
  • deployment_id foreign key in DB and application code
  • pub sub topic and events

Database-related renaming will be done later. Pub sub topic and events should and will be adjusted, but this is not the time. It won't be a simple rename and needs more care and thought.

@nshoes nshoes changed the title big WIP DeploymentGroups and DeploymentReleases Nov 20, 2024
@nshoes nshoes force-pushed the managed-deploys/remove-deployment-recalculation branch 5 times, most recently from 32abbc4 to d34b3d2 Compare November 26, 2024 19:38
@nshoes nshoes force-pushed the managed-deploys/deployment-groups-and-deployment-releases branch 2 times, most recently from 1b97ac0 to 5b70ac5 Compare November 28, 2024 01:59
@nshoes nshoes force-pushed the managed-deploys/remove-deployment-recalculation branch 2 times, most recently from 4c72acc to 995a8f8 Compare December 5, 2024 16:55
Base automatically changed from managed-deploys/remove-deployment-recalculation to main December 6, 2024 22:55
@nshoes nshoes force-pushed the managed-deploys/deployment-groups-and-deployment-releases branch from 5b70ac5 to 03e63ba Compare December 19, 2024 19:53
@nshoes nshoes changed the title DeploymentGroups and DeploymentReleases Managed Deployments: Groups and Releases Dec 19, 2024
@nshoes nshoes force-pushed the managed-deploys/deployment-groups-and-deployment-releases branch from 03e63ba to dc97780 Compare December 19, 2024 20:19
@nshoes nshoes force-pushed the managed-deploys/deployment-groups-and-deployment-releases branch 2 times, most recently from 15dbf73 to da17189 Compare January 15, 2025 05:00
nshoes added a commit that referenced this pull request Feb 26, 2025
…platform when batch-updating (#1912)

Previously, we displayed all deployments as options when batch-updating
devices. This is confusing because you could see deployments that
shouldn't be options. This PR now requires you to filter by platform
first before having the ability to bulk move devices into a deployment.

This change does create an extra step when moving devices to a
deployment but it's important to note this is an interim feature before
#1653 is finished.
@nshoes nshoes force-pushed the managed-deploys/deployment-groups-and-deployment-releases branch from 7a56134 to 4bbcfb9 Compare February 26, 2025 22:47
@nshoes nshoes force-pushed the managed-deploys/deployment-groups-and-deployment-releases branch 2 times, most recently from b2f510a to 97f872c Compare March 6, 2025 20:48
alias NervesHub.ManagedDeployments.DeploymentGroup

@spec audit_deployment_created(User.t(), DeploymentGroup.t()) :: :ok
def audit_deployment_created(user, deployment_group) do
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These function names should change, but they shouldn't just have _group added to them. I want to make a more wholistic change to device template that removes the resource name from the function names, e.g. DeploymentGroupTemplates.audit_created. We'll save that work for later.

@@ -360,28 +360,6 @@ defmodule NervesHub.Devices do
end
end

def get_eligible_deployments(%Device{firmware_metadata: nil}), do: []
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This function was unused.

@@ -0,0 +1,15 @@
defmodule NervesHub.ManagedDeployments.InflightDeploymentCheck do
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No need to rename as we're planning on keeping the term "deployments" to describe the literal process instead of a resource.

@@ -106,6 +106,10 @@ defmodule NervesHubWeb do

def page_title(socket, page_title), do: assign(socket, :page_title, page_title)

@spec sidebar_tab(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sneaking this in :)

@nshoes nshoes force-pushed the managed-deploys/deployment-groups-and-deployment-releases branch from 97f872c to b9dd1e0 Compare March 7, 2025 17:27
@nshoes nshoes force-pushed the managed-deploys/deployment-groups-and-deployment-releases branch from b9dd1e0 to 76fc857 Compare March 7, 2025 17:37
@nshoes nshoes requested a review from joshk March 7, 2025 17:42
@nshoes nshoes marked this pull request as ready for review March 7, 2025 17:42
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.

1 participant