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

bug: coder_app declaration can attempt to overflow length of column workspace_apps.display_name #307

Open
abhi1693 opened this issue Nov 22, 2024 · 3 comments
Labels
good first issue Good for newcomers

Comments

@abhi1693
Copy link

abhi1693 commented Nov 22, 2024

I have a coder template that takes git_branch as a value. Anytime a developer tries to checkout the jira created branch, the provisioner fails with

internal provisionerserver error: complete job: execute transaction: insert provisioner job: insert app: pq: value too long for type character varying(64)

I'm not sure for how long this branch is going to remain active but here is an example: https://github.com/Onemind-Services-LLC/netbox-secrets/tree/OMS-419-Warning-Accessing-the-database-during-app-initialization-in-NetBoxSecrets-plugin

If I checkout dev branch, it works perfectly fine.

It seems like coder_parameter is set in the DB and must never be more than 64 characters

@johnstcn
Copy link
Member

Hey @abhi1693 , I think this may be an issue in your template. The column workspace_apps.display_name is limited to 64 characters max.

My current theory is that your template is trying to create a coder_app with a display_name longer than 64 characters.
We should really be validating this in the coder/coder Terraform provider before this can make its way to the database.

Can you check the respective template and see if what I've mentioned above is the case?
If so, can you try trimming the workspace app display_name to be less than 64 characters in length?

@abhi1693
Copy link
Author

That actually fixed the issue

@johnstcn johnstcn changed the title value too long for type character varying(64) bug: coder_app declaration can attempt to overflow length of column workspace_apps.display_name Nov 22, 2024
@johnstcn
Copy link
Member

Thanks for confirming @abhi1693 ! I still think this is a bug in the Terraform provider so I'm going to go ahead and move the issue over there.

@johnstcn johnstcn transferred this issue from coder/coder Nov 22, 2024
@johnstcn johnstcn added the good first issue Good for newcomers label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants