-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Issue/3270] Make docker context path be the parent of the beamable config folder #3374
Conversation
cli/cli/Services/BeamoLocalSystem.cs
Outdated
@@ -353,9 +359,14 @@ private async Promise UpdateDockerFile(string serviceName) | |||
|
|||
foreach (var dependency in dependencies) | |||
{ | |||
string depName = dependency.name; | |||
newText = newText.Replace(endTag, replacement.Replace(serviceNameTag, depName)); | |||
string path = _configService.GetRelativeToBeamableFolderPath(dependency.projPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be relative to the docker context path.
@@ -309,11 +309,12 @@ public async Task AddProjectDependency(BeamoServiceDefinition project, BeamoServ | |||
public static bool ValidateBeamoServiceId_DoesntExists(string beamoServiceId, List<BeamoServiceDefinition> serviceDefinitions) => | |||
!serviceDefinitions.Contains(new BeamoServiceDefinition() { BeamoId = beamoServiceId }, new BeamoServiceDefinition.IdEquality()); | |||
|
|||
private async Promise UpdateDockerFile(string serviceName) | |||
public async Promise UpdateDockerFile(BeamoServiceDefinition serviceDefinition) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
call this from services run and services deploy
{ | ||
if (line.StartsWith("COPY")) | ||
{ | ||
var parts = line.Split(" "); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use remove empty entries here, and check if this array has COPY SOURCE DESTINATION, 3 elements, then it's correct. And throw specific exceptions that we care about in the GetAttributes call
@@ -34,6 +34,11 @@ public partial class BeamoLocalSystem | |||
BeamoProtocolType.HttpMicroservice, | |||
async (definition, protocol) => | |||
{ | |||
if (string.IsNullOrEmpty(buildContexPath)) | |||
{ | |||
buildContexPath = _configService.GetDockerBuildContextPath(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this parameter and just get the value from this method from ConfigService
…/3270 # Conflicts: # cli/cli/Services/ProjectService.cs
Lightbeam link |
Lightbeam link |
Lightbeam link |
Lightbeam link |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💣
…e beamable config folder (#3374)
Ticket
resolves #3270
Brief Description
While working on fixing the
beam services run
command, I found that because we use standalone microservices in different ways, for example in the Unity SDK, then we were previously, it means that the way we were handling the docker context path was wrong and would only work for what is inside the microservice folder, and not work with dependencies for example. This basically fixes that, making the docker context path be the parent folder of the beamable config folder in the project.Notes
When you are merging a feature branch into
main
, please squash merge and make sure the final commit contains any relevent JIRA ticket number. If you are merging frommain
tostaging
, orstaging
toproduction
, please use a regular merge commit.Does this introduce tech-debt? If so, have you added an entry to the Tech-debt document?