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

chore: fleet improvements #3438

Merged
merged 2 commits into from
Feb 4, 2025
Merged

Conversation

TBonnin
Copy link
Collaborator

@TBonnin TBonnin commented Feb 3, 2025

  • adding 'image' column to deployment
    • it will make it easy to switch to another image without having to change fleet code (for example if we move runner to the unified image).
    • Note: the column is not used by fleet supervisor yet. Coming in next PR :)
  • checking if the image exist when rolling out to avoid rolling out while master is building
  • add 'notes' column to node_overrides
    • won't be used by the app but I wanted a text column where we can manually enter useful information like the name of the customer or 'Thomas's runner'
  • making image, cpu_mill, memory_mb, storage_mb columns nullable in the node_overrides table. I will change the logic: if value is null, fleet will pick default values instead of having to insert specific values when overriding, especially useful for the image that changes with each deployment

@TBonnin TBonnin requested a review from a team February 3, 2025 20:38
Copy link

linear bot commented Feb 3, 2025

@TBonnin TBonnin force-pushed the tbonnin/NAN-2577/fleet-improvement branch from 6daceb9 to 93e2df3 Compare February 3, 2025 21:09
Copy link
Collaborator

@bodinsamuel bodinsamuel left a comment

Choose a reason for hiding this comment

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

🙌🏻

}
return Ok(DBDeployment.to(inserted));
});
} catch (err) {
return Err(new FleetError(`deployment_creation_failed`, { cause: err, context: { commitId } }));
console.log(err);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if this was intended or a leftover

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

🤦

previousDeployment = (await deployments.create(dbClient.db, generateCommitHash().unwrap())).unwrap();
activeDeployment = (await deployments.create(dbClient.db, generateCommitHash().unwrap())).unwrap();
previousDeployment = (await deployments.create(dbClient.db, generateImage().unwrap())).unwrap();
activeDeployment = (await deployments.create(dbClient.db, generateImage().unwrap())).unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

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

.unwrap().unwrap().unwrap().unwrap() 😆

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@TBonnin TBonnin force-pushed the tbonnin/NAN-2577/fleet-improvement branch from 93e2df3 to 938c81d Compare February 4, 2025 14:30
@TBonnin TBonnin enabled auto-merge (squash) February 4, 2025 14:31
- adding 'image' column to deployment
    - it will make it easy to switch to another image without having to change
fleet code (for example if we move runner to the unified image).
    - Note: the column is not used by fleet supervisor yet. Coming in next PR :)
- checking if the image exist when rolling out to avoid rolling out while master is building
- add 'notes' column to node_overrides
    - won't be used by the app but I wanted a text column where we can
      manually enter useful information like the name of the customer or 'Thomas's runner'
- making image, cpu_mill, memory_mb, storage_mb columns nullable in the node_overrides table.
    - I will change the overiding logic: if value is null, fleet will pick default values instead of having to insert specific values when overriding, especially useful for the image that changes with each deployment
@TBonnin TBonnin force-pushed the tbonnin/NAN-2577/fleet-improvement branch from 938c81d to bd66039 Compare February 4, 2025 17:09
@TBonnin TBonnin merged commit 7c6569d into master Feb 4, 2025
17 checks passed
@TBonnin TBonnin deleted the tbonnin/NAN-2577/fleet-improvement branch February 4, 2025 17:15
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