Skip to content

trailing comma fix for oidc #8

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

Merged
merged 1 commit into from
Jul 21, 2025
Merged

Conversation

jpetrucciani
Copy link
Contributor

@jpetrucciani jpetrucciani commented Jun 20, 2025

this makes it so the comma is only added in the case that you have those env vars specified, prepending it so that we don't have the case where it fails to parse

should fix #7

this is not formatted/prettified, so perhaps this could be a good fix?
@fiftin
Copy link
Contributor

fiftin commented Jun 20, 2025

Did you test the PR?

@jpetrucciani
Copy link
Contributor Author

jpetrucciani commented Jun 20, 2025

I've tested this rendering out locally with and without the forwarded_env_vars, and it now generates valid/parse-able JSON in both cases for me. I used my fork + branch and ran:

helm dependency build ./stable/semaphore/

helm template -f values.yaml semaphore ./stable/semaphore/   # tested without `forwarded_env_vars`, then added and ran again

values.yaml:

oidc:
  enable: true
  providers:
    google:
      client_id: '...'
      client_secret: '...'
      color: 'blue'
      display_name: 'sign in with google'
      icon: 'google'
      name_claim: 'name'
      provider_url: 'https://accounts.google.com'
      redirect_url: 'https://website.com/api/auth/oidc/google/redirect'
      username_claim: '|'

# this was added after the first run
config:
  forwarded_env_vars: ["TEST"]

@jpetrucciani jpetrucciani changed the title potential trailing comma fix trailing comma fix for oidc Jun 20, 2025
@leighwgordon
Copy link

Hi, is there anything else to be validated/tested for this one, as current stable release and current main are broken until this issue is resolved.

I can workaround it with something like this, to make it generate valid JSON but it's quite messy:

# TODO: temporary hack to workaround bug until https://github.com/semaphoreui/charts/pull/8 is released
config:
  forwarded_env_vars: ["DUMMY"]

Thanks!

@fiftin fiftin merged commit 8c6fab7 into semaphoreui:main Jul 21, 2025
@jpetrucciani jpetrucciani deleted the patch-1 branch July 21, 2025 20:44
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.

Regression of OIDC fix
3 participants