rstudio / rstudio/helm

Workbench: `notifications.conf` does not template correctly

Open
#442 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

team: workbench
Dominant language
Markdown
Stars
46
Forks
40
Avg merge
4h 3m
Merged PRs (30d)
6

Description

Reprex

values.yaml:

config:
  session:
    notifications.conf:
      - StartTime: 2023-11-20 12:00:00 -5:00
        EndTime: 2023-12-27 20:00:00 -05:00
        Message: Please remember to shut down your computers at the end of the day.

Output:

$ helm template posit-workbench rstudio/rstudio-workbench --values values.yaml | grep -C 5 notifications.conf
coalesce.go:286: warning: cannot overwrite table with non table for rstudio-workbench.config.session.notifications.conf (map[])
coalesce.go:286: warning: cannot overwrite table with non table for rstudio-workbench.config.session.notifications.conf (map[])
metadata:
  name: posit-workbench-rstudio-workbench-session
  namespace: samedwardes-posit-team
data:
  
  notifications.conf: |
    EndTime=2023-12-27 20:00:00 -05:00
    Message=Please remember to shut down your computers at the end of the day.
    StartTime=2023-11-20 12:00:00 -5:00
  
  rsession.conf: |

Expected output:

data:
  
  notifications.conf: |
    EndTime: 2023-12-27 20:00:00 -05:00
    Message: Please remember to shut down your computers at the end of the day.
    StartTime: 2023-11-20 12:00:00 -5:00

The issue is that the notifications.conf format should use : instead of =: https://docs.posit.co/ide/server-pro/rstudio_pro_sessions/notifications.html

Temporary fix

If users are running into this issue, they can pass the entire notifications.conf as a string instead of a YAML object:

config:
  session:
    notifications.conf: |
      StartTime: 2023-11-20 12:00:00 -5:00
      EndTime: 2023-12-27 20:00:00 -05:00
      Message: Please remember to shut down your computers at the end of the day.
Long term fix

We should update the templating so that when notifications.yaml gets a yaml object we use : instead of = in the output.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the provided values.yaml and helm template, then trace the chart templating for config.session.notifications.conf. The fix is complete when an object input renders each notification field with : rather than =, matching the documented format and expected output.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.