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

pinned apps not casting configuration to an array #1810

Open
johrstrom opened this issue Feb 2, 2022 · 0 comments · May be fixed by #3528
Open

pinned apps not casting configuration to an array #1810

johrstrom opened this issue Feb 2, 2022 · 0 comments · May be fixed by #3528

Comments

@johrstrom
Copy link
Contributor

johrstrom commented Feb 2, 2022

I just got this error

undefined method `to_a' for "dev/rstudio":String Did you mean? to_d to_r to_f to_i to_s to_c in this stack trace```textapp/apps/router.rb:28:in `pinned_apps'

app/controllers/application_controller.rb:60:in set_pinned_apps' activesupport (6.0.4.1) lib/active_support/callbacks.rb:428:in block in make_lambda'
activesupport (6.0.4.1) lib/active_support/callbacks.rb:200:in `block (2 levels) in halting'

To replicate, set `pinned_apps` erroneously as below in a an `ondemand.d/` file.  It'll be a string, not an array

```yaml
pinned_apps:
  'dev/rstudio'  # this here should start with a - to be I'm thinking the configuration should guarantee an array is being passed back.

def pinned_apps
config.fetch(:pinned_apps, [])
end

┆Issue is synchronized with this Asana task by Unito

@johrstrom johrstrom added bug Existing functionality not working as expected good first issue labels Feb 2, 2022
@johrstrom johrstrom added this to the 2.1 milestone Feb 2, 2022
@gerald-byrket gerald-byrket added this to Needs Discussion in Open OnDemand Documentation Jul 18, 2022
@Oglopf Oglopf added component/dashboard and removed bug Existing functionality not working as expected component/dashboard labels Dec 5, 2022
@johrstrom johrstrom modified the milestones: 2.1, 2.2 Jan 11, 2023
@johrstrom johrstrom modified the milestones: 3.1, 4.0 Sep 22, 2023
@alarad27 alarad27 self-assigned this Apr 2, 2024
@alarad27 alarad27 linked a pull request Apr 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants