You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe
As a modern mac user (M-series processors) and a newcomer to UDS tasks who needs to work on an ARM processor but deploy to AMD64 clusters, the way the UDS CLI and UDS tasks select the target architecture is confusing enough to produce significant frustration.
If no architecture is specified, it assumes my processor's architecture. This is a bad assumption.
The -a flag exists but is largely ignored, or ignored depending on where in the command you locate it. Regardless, it seems unreliable such that I spent much time trying to debug elsewhere assuming the flag worked, when in fact, the flag was still not taking effect.
The the UDS_ARCH variable is visible in the job yaml, especially in the tasks in uds-common, but is not a shell env variable despite being referenced via the $. This is another thing I tried setting to get the desired architecture, and failed. If I understand correctly, it's a reference to something inside the UDS CLI. As long as this variable is visible I expect users will keep being led astray by it. If it can't be made invisible, perhaps the name UDS_USER_ARCH would make it clearer it's an environmental constant, not an environment variable.
The key to understanding all of this is not intuitively derivable from the visible components of the system + past experience with similar tools. It requires reading and recalling this particular part of the docs. I'd suggest avoiding this kind of increase in cognitive load if at all possible.
Describe the solution you'd like
Ideally don't assume. Just require that the value be set.
If assumption is required, log when the assumption is made, that helps me know where my use of UDS tasks isn't producing the desired result. That would save me lots of time debugging.
If UDS_ARCH can't be made into a env variable we can set to override, change it's name to clearly be a constant, such as UDS_USER_ARCH or UDS_USER_SYS_ARCH to be even clearer.
Catch the -a/--architecture flag if a user passes it to UDS or remove it.
If still relevant, bring up the existence and preeminence of the UDS_ARCHITECTURE env variable in the help docs that come out of the CLI tool.
The text was updated successfully, but these errors were encountered:
100% agree that this belongs in this repo vs maru. on the fence about bug or feature, but i think you summed it up reasonably.
For what its worth, i agree the ux here is confusing. Its especially frustrating when combined with the only.cluster.architecture: amd64 being set on some zarf packages.
As for the specific case you had listed, for reference in case anyone else has a similar issue the way to work past using system arch by default and overriding it optionally in tasks is as follows:
# tasks.yamlvariables:
- name: ARCHdefault: ${UDS_ARCH}tasks:
- name: exampledescription: "Example task"inputs:
architecture:
description: The architecture of the package to createdefault: ${ARCH}actions:
- cmd: echo ${{ .inputs.architecture }}
$ uds run example
arm64
$ uds run example --set ARCH="amd64"
amd64
notably, this would also work with the with key like so:
includes:
- create: https://raw.githubusercontent.com/defenseunicorns/uds-common/v1.2.2/tasks/create.yamlvariables:
- name: ARCHdefault: ${UDS_ARCH}tasks:
- name: create-dev-packagedescription: Create the Valkey packageinputs:
architecture:
description: The architecture of the package to createdefault: ${ARCH}actions:
- task: create:packagewith:
options: "--skip-sbom"architecture: "${{ .inputs.architecture }}"
Is your feature request related to a problem? Please describe
As a modern mac user (M-series processors) and a newcomer to UDS tasks who needs to work on an ARM processor but deploy to AMD64 clusters, the way the UDS CLI and UDS tasks select the target architecture is confusing enough to produce significant frustration.
If no architecture is specified, it assumes my processor's architecture. This is a bad assumption.
The
-a
flag exists but is largely ignored, or ignored depending on where in the command you locate it. Regardless, it seems unreliable such that I spent much time trying to debug elsewhere assuming the flag worked, when in fact, the flag was still not taking effect.The the
UDS_ARCH
variable is visible in the job yaml, especially in the tasks in uds-common, but is not a shell env variable despite being referenced via the$
. This is another thing I tried setting to get the desired architecture, and failed. If I understand correctly, it's a reference to something inside the UDS CLI. As long as this variable is visible I expect users will keep being led astray by it. If it can't be made invisible, perhaps the nameUDS_USER_ARCH
would make it clearer it's an environmental constant, not an environment variable.The key to understanding all of this is not intuitively derivable from the visible components of the system + past experience with similar tools. It requires reading and recalling this particular part of the docs. I'd suggest avoiding this kind of increase in cognitive load if at all possible.
Describe the solution you'd like
UDS_ARCH
can't be made into a env variable we can set to override, change it's name to clearly be a constant, such asUDS_USER_ARCH
orUDS_USER_SYS_ARCH
to be even clearer.-a
/--architecture
flag if a user passes it to UDS or remove it.UDS_ARCHITECTURE
env variable in the help docs that come out of the CLI tool.The text was updated successfully, but these errors were encountered: