kas/ci: Fix bitbake variable referencing themselves
PATCH 1/1 kas/ci: Fix bitbake variable referencing themselves
When trying to run a local kas build using the kas/opt/ci.yaml option file the following bitbake error occurred as the following two bitbake variables were referencing themselves:
Variables:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
Error:
bb.data_smart.ExpansionError: Failure expanding variable AWS_ACCESS_KEY_ID, expression was ${AWS_ACCESS_KEY_ID} which triggered exception
Exception: variable AWS_ACCESS_KEY_ID references itself! The variable dependency chain for the failure is: AWS_ACCESS_KEY_ID
The problem only exists for local builds as the gitlab project configuration defines such variables.
We can avoid the bitbake error by stopping forwaring the variables to bitbake. We don't need those variables inside the build environment. The only user is located in the deploy_to_aws.sh script, which is executed on gitlab CI level.
--- kas/opt/ci.yaml | 4 ---- 1 file changed, 4 deletions(-)
kas/opt/ci.yaml +0 -4
@@ -23,7 +23,3 @@ local_conf_header: IMAGE_INSTALL:remove = "sshd-regen-keys" IMAGE_INSTALL:remove = "expand-on-first-boot" IMAGE_FSTYPES = "${@ 'ext4.gz' if d.getVar('MACHINE', True).startswith('qemu') else 'tar.gz' }" - -env: - AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} - AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
Signature · 1 line
2.54.0
Quoted 33 lines · Florian Bezdeka
When trying to run a local kas build using the
kas/opt/ci.yamloption file the following bitbake error occurred as the following two bitbake variables were referencing themselves:Variables:
-AWS_ACCESS_KEY_ID
-AWS_SECRET_ACCESS_KEYError:
bb.data_smart.ExpansionError: Failure expanding variableAWS_ACCESS_KEY_ID, expression was ${AWS_ACCESS_KEY_ID} which triggered exception
Exception: variableAWS_ACCESS_KEY_IDreferences itself! The variable dependency chain for the failure is:AWS_ACCESS_KEY_IDThe problem only exists for local builds as the gitlab project configuration defines such variables.
We can avoid the bitbake error by stopping forwaring the variables to bitbake. We don't need those variables inside the build environment. The only user is located in the
deploy_to_aws.shscript, which is executed on gitlab CI level.Signed-off-by Florian Bezdeka <[email protected]>--- kas/opt/ci.yaml | 4 ---- 1 file changed, 4 deletions(-)kas/opt/ci.yaml +0
-0
kas/opt/ci.yaml local_conf_header: · line 29
Quoted 7 lines
kas/opt/ci.yaml +0
-4@@ -23,7 +23,3 @@ local_conf_header: IMAGE_INSTALL:remove = "sshd-regen-keys" IMAGE_INSTALL:remove = "expand-on-first-boot" IMAGE_FSTYPES = "${@ 'ext4.gz' if d.getVar('MACHINE', True).startswith('qemu') else 'tar.gz' }" - -env: - AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} - AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
Check the introducing commit 0e027423275a why those two are probably needed for bitbake as well.
Jan
Signature · 2 lines
Siemens AG, Foundational Technologies Linux Expert Center
Quoted 29 lines · Jan Kiszka
Quoted 28 lines · Florian Bezdeka
When trying to run a local kas build using the
kas/opt/ci.yamloption file the following bitbake error occurred as the following two bitbake variables were referencing themselves:Variables:
-AWS_ACCESS_KEY_ID
-AWS_SECRET_ACCESS_KEYError:
bb.data_smart.ExpansionError: Failure expanding variableAWS_ACCESS_KEY_ID, expression was ${AWS_ACCESS_KEY_ID} which triggered exception
Exception: variableAWS_ACCESS_KEY_IDreferences itself! The variable dependency chain for the failure is:AWS_ACCESS_KEY_IDThe problem only exists for local builds as the gitlab project configuration defines such variables.
We can avoid the bitbake error by stopping forwaring the variables to bitbake. We don't need those variables inside the build environment. The only user is located in the
deploy_to_aws.shscript, which is executed on gitlab CI level.Signed-off-by Florian Bezdeka <[email protected]>--- kas/opt/ci.yaml | 4 ---- 1 file changed, 4 deletions(-)
Quoted 16 lines
kas/opt/ci.yaml local_conf_header: · line 29
Quoted 12 lines
kas/opt/ci.yaml +0
-4@@ -23,7 +23,3 @@ local_conf_header: IMAGE_INSTALL:remove = "sshd-regen-keys" IMAGE_INSTALL:remove = "expand-on-first-boot" IMAGE_FSTYPES = "${@ 'ext4.gz' if d.getVar('MACHINE', True).startswith('qemu') else 'tar.gz' }" - -env: - AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} - AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}Check the introducing commit
0e027423275awhy those two are probably needed for bitbake as well.
That said, maybe setting those to empty is already enough because kas will then pick up their value from the calling env - if set. In any case, please validate any new proposal accordingly.
Jan
Signature · 2 lines
Siemens AG, Foundational Technologies Linux Expert Center