e-mission / e-mission-docs

Repository for docs and issues. If you need help, please file an issue here. Public conversations are better for open source projects than private email.
https://e-mission.readthedocs.io/en/latest
BSD 3-Clause "New" or "Revised" License
15 stars 34 forks source link

🚨 Configs generated from Github form don't work with `e-mission-phone` #1050

Closed JGreenlee closed 9 months ago

JGreenlee commented 9 months ago

While attempting to test dfc-fermata, I saw that e-mission-phone was displaying an error while reading the downloaded config. After investigating, I see that it is expecting server.connectUrl as a required field, and the configs have server.connectURL (URL in capital letters) instead.

dfc-fermata, doee-electricbike-proj, and uw-prs exhibit this issue and will not be able to be read by e-mission-phone until we fix the configs

@Abby-Wheelis @sebastianbarry Can you take a look? I think we can just update those 3 configs and line 281 of parse-issue-body.js @shankari for visibility

shankari commented 9 months ago

@JGreenlee @jgu2 reported this issue while trying to create the instances, and I fixed all of them on Friday night (e.g. https://github.com/e-mission/nrel-openpath-deploy-configs/commit/a5e7eeb015aff08dfa8d980adca2b6a25db06d87) I have also asked @sebastianbarry to fix the config generation script.

JGreenlee commented 9 months ago

Ah, I am glad it was caught already!


But wait, is there also an issue with opcode ?

dfc-fermata has this:

...
"opcode": {
    "autogen": false,
    "subgroups": [
      ""
    ]
  },
...

This is causing trouble because if opcode is defined at all, we expect new-style tokens (with 4 parts including subgroup) But there are no subgroups here at all. So what would opcodes look like for this then? @shankari

JGreenlee commented 9 months ago

nrelop_dfc-fermata__user (two underscores) does not work because we have a qualifier in e-mission-phone that no token part can be empty string ('')

shankari commented 9 months ago

You are correct about opcodes. If the user does not specify opcodes, we should include valid opocodes for "test" and "default". Let me do that right now for dfc-fermata, but @sebastianbarry should fix this too

shankari commented 9 months ago

I looked at the other github form opcodes, and it looks like this only happens for autogenerated = false. I am 99% sure that the Fermata projects wants autogenerated codes, they just don't know it yet. I am changing it to be autogenerated by editing the form ❗❗❗❗❗

shankari commented 9 months ago

Done. While making the changes, I also noticed that flipping autogenerate changed the display of the token_generation screen in the admin dashboard to true (https://github.com/e-mission/nrel-openpath-deploy-configs/pull/73/commits/824b0e94561a3525911dc7ae1a7c8ba69f1feb8d from https://github.com/e-mission/nrel-openpath-deploy-configs/pull/73) But this is backwards, if we are autogenerating the tokens, then admins don't need to manage the tokens through the admin dashboard. Also the spelling of token is incorrect. I have now fixed this manually, but the config script needs to be changed as well.

JGreenlee commented 9 months ago

The configs themselves were fixed manually and the config generation from the form was fixed by https://github.com/e-mission/nrel-openpath-deploy-configs/pull/74