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: UCC Import from Add On Builder does not work if you are using Global Account Settings Setup Parameters #1379

Open
TTony5 opened this issue Oct 15, 2024 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@TTony5
Copy link

TTony5 commented Oct 15, 2024

Description

Hello,

Running into what I think is a bug. I am trying to convert my add on builder app to a splunk packaged app using ucc. However, I am getting the following error:

ERROR: placeholder option found for configuration tab 'account' -> entity field 'username'. We recommend to use help instead (https://splunk.github.io/addonfactory-ucc-generator/entity/).
Deprecation notice: #831.

Recreation steps:
Create an app using Splunk Add on Builder -> Add Global Account Settings to Set up Parameters -> use UCC import from AOB function

I could very well be missing something as I am new to using UCC. But, there does not look to be a way that I can stop using the placeholder option in username as this is a global account setting and doesnt really have a changeable option. Is there a way to fix this or to ignore the error?

Screenshot from 2024-10-15 08-21-57

image

What UCC version are you using?

splunk-add-on-ucc-framework=5.50.1

Additional System Info

Python Version: Python 3.8.16

@TTony5 TTony5 added bug Something isn't working triage Pending triage from maintainers labels Oct 15, 2024
@vtsvetkov-splunk
Copy link
Contributor

@TTony5, thank you for the feedback!

Removing the placeholder is an intentional decision. This attribute is often overused in misleading UX patterns, so we dropped its support since it is frequently misused. Read about issues placeholders can cause.

Please help me understand your use case. Do you want to make a read-only field?
If it is "very" static, you can set it's value in globalConfig.json via defaultValue. Here is an example:

image

Would this work for you?

@vtsvetkov-splunk vtsvetkov-splunk removed the triage Pending triage from maintainers label Oct 15, 2024
@TTony5
Copy link
Author

TTony5 commented Oct 15, 2024

It needs to be dynamic unfortunately as it will allow us to have multiple accounts with multiple tokens. I created a bash script that will automatically convert the add on builder app and move it into a Gitlab repository. Halfway into the script, it pops that error due to a placeholder being somewhere in the Global Account Settings. I am using the username as the holder of the account ID and the password as the holder for the bearer token. From Add On Builder, is there a way to change the username and password entities from placeholder?

@vtsvetkov-splunk
Copy link
Contributor

@TTony5
To provide a more accurate response, additional context is needed regarding where username value is stored. Is it stored in a configuration file? If so, it can likely be retrieved using the same method as other field values.

In the absence of more details, here's a potential solution based on common patterns:

The common pattern is we allow users to create account with user-provided account name
image

but we don't allow to change the name during update
image

it can be achieved for any field with

"options": {
    "disableonEdit": true
},

@vtsvetkov-splunk vtsvetkov-splunk added help wanted Extra attention is needed and removed bug Something isn't working labels Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants