-
Notifications
You must be signed in to change notification settings - Fork 87
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
dotnet eb deploy-environment not setting the Procfile web startup properly #285
Comments
Hi @ddivita, Good morning. Based on initial high level look, I'm not sure if the
So just curious on how in your case, the Unsure if this is the AWS .NET CLI extensions issue since CC @normj Thanks, |
@ashishdhingra The Procfile is definitely being auto-generated by something ;). I can see the file in the zipped code and looks exactly like the example I set manually. |
@ddivita Is it generated automatically locally when compiling under Visual Studio? If not, might be there is some step in your pipeline that generates it! |
@ddivita Looks like I found EBUtilities.SetupPackageForLinux() which uses the existing Could you please share the sample project for reproduction with folder structure for issue? Thanks, |
@ashishdhingra I think I see what might be going on. That method you posted led me to look at the runtimeconfig.json file. There are several, and that code picks the first file it sees which is why it may have been failing? I wonder if I only have 1 Files in the .zip |
This was the issue. I set the |
@ddivita Thanks for the findings and update. Please confirm if we are good to close this issue. Thanks, |
This issue has not received a response in 5 days. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled. |
@ashishdhingra If this is by design, then this can be closed, however, what if there are multiple startup projects in a solution? This would always break it. |
@ddivita Thanks for your inputs. I will review this with team and get back to you. |
Describe the bug
I will preface this by saying this could be a GitLab pipeline issue, however, I have also seen this happen on a local development machine.
Command:
GitLab script:
The script initiates the dotnet publish command:
After the
publish
compiles the project and creates the files, theProcfile
is auto-generated. The issue is theProcfile
is not setting the proper startupweb
assembly.Expected Behavior
Running the same command on a local environment produces this Procfile:
Current Behavior
The auto-generated
Procfile
is pointing to the wrong assembly. It's not always the same assembly either, but it never picks the API assembly. Even when theProcfile
is created manually, it still does not deploy properly.Reproduction Steps
I'm not 100% sure what might be going on, but I have a Minimal API that is also referencing an MS Test project. I'm not sure that is the issue since I can run the commands locally without issue. It could be the docker image used for the deployment.
I have another minimal API project that deploys fine in GitLab and locally. This project has no references to any other projects.
Possible Solution
I tried creating a
Procfile
that is set toCopy Always
in the root of the API project. This does not work locally or in the pipeline.Contents of the
Procfile
This is in the logs, which makes sense:
However, the instance does not deploy properly:
Additional Information/Context
No response
Targeted .NET platform
.Net 7
CLI extension version
AWS CLI:
aws-cli/1.19.1 Python/3.9.2 Linux/5.4.109+ botocore/1.20.0
Donet EB:
dotnet-eb Tool 'amazon.elasticbeanstalk.tools' (version '4.3.2') was successfully installed
GitLab Runner:
Environment details (OS name and version, etc.)
linux
The text was updated successfully, but these errors were encountered: