This is an automated email from the ASF dual-hosted git repository.

pierrejeambrun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 0ebac601a6 Add SBOM files generation to airflow release process 
(#34235)
0ebac601a6 is described below

commit 0ebac601a6f5286eaf66b2f971de376974dc56c8
Author: Pierre Jeambrun <[email protected]>
AuthorDate: Sat Sep 9 21:24:24 2023 +0200

    Add SBOM files generation to airflow release process (#34235)
    
    * Add SBOM files generation to airflow release process
    
    * Fix new param config
    
    ---------
    
    Co-authored-by: Hussein Awala <[email protected]>
---
 dev/README_RELEASE_AIRFLOW.md                        |  1 +
 .../src/airflow_breeze/commands/sbom_commands.py     |  8 +++++---
 .../airflow_breeze/commands/sbom_commands_config.py  |  2 +-
 images/breeze/output-commands-hash.txt               |  4 ++--
 images/breeze/output_sbom.svg                        | 20 ++++++++++----------
 .../breeze/output_sbom_update-sbom-information.svg   |  2 +-
 6 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/dev/README_RELEASE_AIRFLOW.md b/dev/README_RELEASE_AIRFLOW.md
index faff07a55e..eef0150282 100644
--- a/dev/README_RELEASE_AIRFLOW.md
+++ b/dev/README_RELEASE_AIRFLOW.md
@@ -828,6 +828,7 @@ Documentation for providers can be found in the 
``/docs/apache-airflow`` directo
     ```shell script
     breeze release-management publish-docs --package-filter apache-airflow 
--package-filter docker-stack
     breeze release-management add-back-references apache-airflow 
--airflow-site-directory "${AIRFLOW_SITE_DIRECTORY}"
+    breeze sbom update-sbom-information --airflow-version ${VERSION} 
--airflow-site-directory ${AIRFLOW_SITE_DIRECTORY} --force
     cd "${AIRFLOW_SITE_DIRECTORY}"
     git add .
     git commit -m "Add documentation for Apache Airflow ${VERSION}"
diff --git a/dev/breeze/src/airflow_breeze/commands/sbom_commands.py 
b/dev/breeze/src/airflow_breeze/commands/sbom_commands.py
index 10ac14755a..31cb8c16c8 100644
--- a/dev/breeze/src/airflow_breeze/commands/sbom_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/sbom_commands.py
@@ -80,10 +80,10 @@ SBOM_INDEX_TEMPLATE = """
 
 @sbom.command(name="update-sbom-information", help="Update SBOM information in 
airflow-site project.")
 @click.option(
-    "--airflow-site-dir",
+    "--airflow-site-directory",
     type=click.Path(file_okay=False, dir_okay=True, path_type=Path, 
exists=True),
     required=True,
-    envvar="AIRFLOW_SITE_DIR",
+    envvar="AIRFLOW_SITE_DIRECTORY",
     help="Directory where airflow-site directory is located.",
 )
 @click.option(
@@ -154,13 +154,15 @@ def update_sbom_information(
             get_console().print(f"[warning]The {airflow_version_dir} does not 
exist. Skipping")
             continue
         destination_dir = airflow_version_dir / "sbom"
-        destination_dir.mkdir(parents=True, exist_ok=True)
         if destination_dir.exists():
             if not force:
                 get_console().print(f"[warning]The {destination_dir} already 
exists. Skipping")
                 continue
             else:
                 get_console().print(f"[warning]The {destination_dir} already 
exists. Forcing update")
+
+        destination_dir.mkdir(parents=True, exist_ok=True)
+
         get_console().print(f"[info]Attempting to update sbom for 
{airflow_v}.")
         get_console().print(f"[success]The {destination_dir} exists. 
Proceeding.")
         for python_version in python_versions:
diff --git a/dev/breeze/src/airflow_breeze/commands/sbom_commands_config.py 
b/dev/breeze/src/airflow_breeze/commands/sbom_commands_config.py
index 14dbcbff38..669f462b30 100644
--- a/dev/breeze/src/airflow_breeze/commands/sbom_commands_config.py
+++ b/dev/breeze/src/airflow_breeze/commands/sbom_commands_config.py
@@ -29,7 +29,7 @@ SBOM_PARAMETERS: dict[str, list[dict[str, str | list[str]]]] 
= {
         {
             "name": "Update SBOM information flags",
             "options": [
-                "--airflow-site-dir",
+                "--airflow-site-directory",
                 "--airflow-version",
                 "--python",
                 "--include-provider-dependencies",
diff --git a/images/breeze/output-commands-hash.txt 
b/images/breeze/output-commands-hash.txt
index 2d7b5ee100..b21c8031fc 100644
--- a/images/breeze/output-commands-hash.txt
+++ b/images/breeze/output-commands-hash.txt
@@ -53,8 +53,8 @@ 
release-management:update-constraints:02ec4b119150e3fdbac52026e94820ef
 release-management:verify-provider-packages:96dce5644aad6b37080acf77b3d8de3a
 release-management:1098994e77919b0de653e5029bccbd14
 sbom:generate-provider-requirements:2ea27f55be4e6ab2b0b5a410330f2747
-sbom:update-sbom-information:fd56648af8e1c8ab59b1b1377c032fb6
-sbom:7278ea41cd78e42425eb4933fc84ec6f
+sbom:update-sbom-information:653be48be70b4b7ff5172d491aadc694
+sbom:ff73e9f941b6d6053e680ca53e9d1b33
 setup:autocomplete:fffcd49e102e09ccd69b3841a9e3ea8e
 setup:check-all-params-in-groups:639dfb061b8da02dcaa4a57b567ff42a
 setup:config:fd32471ee31894decf91984615771add
diff --git a/images/breeze/output_sbom.svg b/images/breeze/output_sbom.svg
index 205f0fa242..0f42e678c1 100644
--- a/images/breeze/output_sbom.svg
+++ b/images/breeze/output_sbom.svg
@@ -35,8 +35,8 @@
     .breeze-sbom-r1 { fill: #c5c8c6;font-weight: bold }
 .breeze-sbom-r2 { fill: #c5c8c6 }
 .breeze-sbom-r3 { fill: #d0b344;font-weight: bold }
-.breeze-sbom-r4 { fill: #68a0b3;font-weight: bold }
-.breeze-sbom-r5 { fill: #868887 }
+.breeze-sbom-r4 { fill: #868887 }
+.breeze-sbom-r5 { fill: #68a0b3;font-weight: bold }
 .breeze-sbom-r6 { fill: #98a84b;font-weight: bold }
     </style>
 
@@ -90,17 +90,17 @@
     
     <g class="breeze-sbom-matrix">
     <text class="breeze-sbom-r2" x="1464" y="20" textLength="12.2" 
clip-path="url(#breeze-sbom-line-0)">
-</text><text class="breeze-sbom-r3" x="12.2" y="44.4" textLength="85.4" 
clip-path="url(#breeze-sbom-line-1)">Usage:&#160;</text><text 
class="breeze-sbom-r1" x="97.6" y="44.4" textLength="158.6" 
clip-path="url(#breeze-sbom-line-1)">breeze&#160;sbom&#160;[</text><text 
class="breeze-sbom-r4" x="256.2" y="44.4" textLength="85.4" 
clip-path="url(#breeze-sbom-line-1)">OPTIONS</text><text class="breeze-sbom-r1" 
x="341.6" y="44.4" textLength="24.4" 
clip-path="url(#breeze-sbom-line-1)">]&#160;</te [...]
+</text><text class="breeze-sbom-r3" x="12.2" y="44.4" textLength="85.4" 
clip-path="url(#breeze-sbom-line-1)">Usage:&#160;</text><text 
class="breeze-sbom-r1" x="97.6" y="44.4" textLength="475.8" 
clip-path="url(#breeze-sbom-line-1)">breeze&#160;sbom&#160;[OPTIONS]&#160;COMMAND&#160;[ARGS]...</text><text
 class="breeze-sbom-r2" x="1464" y="44.4" textLength="12.2" 
clip-path="url(#breeze-sbom-line-1)">
 </text><text class="breeze-sbom-r2" x="1464" y="68.8" textLength="12.2" 
clip-path="url(#breeze-sbom-line-2)">
 </text><text class="breeze-sbom-r2" x="12.2" y="93.2" textLength="768.6" 
clip-path="url(#breeze-sbom-line-3)">Tools&#160;that&#160;release&#160;managers&#160;can&#160;use&#160;to&#160;prepare&#160;sbom&#160;information</text><text
 class="breeze-sbom-r2" x="1464" y="93.2" textLength="12.2" 
clip-path="url(#breeze-sbom-line-3)">
 </text><text class="breeze-sbom-r2" x="1464" y="117.6" textLength="12.2" 
clip-path="url(#breeze-sbom-line-4)">
-</text><text class="breeze-sbom-r5" x="0" y="142" textLength="24.4" 
clip-path="url(#breeze-sbom-line-5)">╭─</text><text class="breeze-sbom-r5" 
x="24.4" y="142" textLength="195.2" 
clip-path="url(#breeze-sbom-line-5)">&#160;Common&#160;options&#160;</text><text
 class="breeze-sbom-r5" x="219.6" y="142" textLength="1220" 
clip-path="url(#breeze-sbom-line-5)">────────────────────────────────────────────────────────────────────────────────────────────────────</text><text
 class="breeze-sbom-r5"  [...]
-</text><text class="breeze-sbom-r5" x="0" y="166.4" textLength="12.2" 
clip-path="url(#breeze-sbom-line-6)">│</text><text class="breeze-sbom-r4" 
x="24.4" y="166.4" textLength="12.2" 
clip-path="url(#breeze-sbom-line-6)">-</text><text class="breeze-sbom-r4" 
x="36.6" y="166.4" textLength="61" 
clip-path="url(#breeze-sbom-line-6)">-help</text><text class="breeze-sbom-r6" 
x="122" y="166.4" textLength="24.4" 
clip-path="url(#breeze-sbom-line-6)">-h</text><text class="breeze-sbom-r2" 
x="170.8" y=" [...]
-</text><text class="breeze-sbom-r5" x="0" y="190.8" textLength="1464" 
clip-path="url(#breeze-sbom-line-7)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
 class="breeze-sbom-r2" x="1464" y="190.8" textLength="12.2" 
clip-path="url(#breeze-sbom-line-7)">
-</text><text class="breeze-sbom-r5" x="0" y="215.2" textLength="24.4" 
clip-path="url(#breeze-sbom-line-8)">╭─</text><text class="breeze-sbom-r5" 
x="24.4" y="215.2" textLength="183" 
clip-path="url(#breeze-sbom-line-8)">&#160;SBOM&#160;commands&#160;</text><text 
class="breeze-sbom-r5" x="207.4" y="215.2" textLength="1232.2" 
clip-path="url(#breeze-sbom-line-8)">─────────────────────────────────────────────────────────────────────────────────────────────────────</text><text
 class="breeze-sbo [...]
-</text><text class="breeze-sbom-r5" x="0" y="239.6" textLength="12.2" 
clip-path="url(#breeze-sbom-line-9)">│</text><text class="breeze-sbom-r4" 
x="24.4" y="239.6" textLength="536.8" 
clip-path="url(#breeze-sbom-line-9)">update-sbom-information&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</text><text
 class="breeze-sbom-r2" x="585.6" y="239.6" textLength="85.4" 
clip-path="url(#breeze-sbom-line-9)">Update&#160;< [...]
-</text><text class="breeze-sbom-r5" x="0" y="264" textLength="12.2" 
clip-path="url(#breeze-sbom-line-10)">│</text><text class="breeze-sbom-r4" 
x="24.4" y="264" textLength="536.8" 
clip-path="url(#breeze-sbom-line-10)">generate-provider-requirements&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</text><text
 class="breeze-sbom-r2" x="585.6" y="264" textLength="854" 
clip-path="url(#breeze-sbom-line-10)">Generate&#160;requirements&#160;for&#160;selected&#1
 [...]
-</text><text class="breeze-sbom-r5" x="0" y="288.4" textLength="1464" 
clip-path="url(#breeze-sbom-line-11)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
 class="breeze-sbom-r2" x="1464" y="288.4" textLength="12.2" 
clip-path="url(#breeze-sbom-line-11)">
+</text><text class="breeze-sbom-r4" x="0" y="142" textLength="24.4" 
clip-path="url(#breeze-sbom-line-5)">╭─</text><text class="breeze-sbom-r4" 
x="24.4" y="142" textLength="195.2" 
clip-path="url(#breeze-sbom-line-5)">&#160;Common&#160;options&#160;</text><text
 class="breeze-sbom-r4" x="219.6" y="142" textLength="1220" 
clip-path="url(#breeze-sbom-line-5)">────────────────────────────────────────────────────────────────────────────────────────────────────</text><text
 class="breeze-sbom-r4"  [...]
+</text><text class="breeze-sbom-r4" x="0" y="166.4" textLength="12.2" 
clip-path="url(#breeze-sbom-line-6)">│</text><text class="breeze-sbom-r5" 
x="24.4" y="166.4" textLength="12.2" 
clip-path="url(#breeze-sbom-line-6)">-</text><text class="breeze-sbom-r5" 
x="36.6" y="166.4" textLength="61" 
clip-path="url(#breeze-sbom-line-6)">-help</text><text class="breeze-sbom-r6" 
x="122" y="166.4" textLength="24.4" 
clip-path="url(#breeze-sbom-line-6)">-h</text><text class="breeze-sbom-r2" 
x="170.8" y=" [...]
+</text><text class="breeze-sbom-r4" x="0" y="190.8" textLength="1464" 
clip-path="url(#breeze-sbom-line-7)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
 class="breeze-sbom-r2" x="1464" y="190.8" textLength="12.2" 
clip-path="url(#breeze-sbom-line-7)">
+</text><text class="breeze-sbom-r4" x="0" y="215.2" textLength="24.4" 
clip-path="url(#breeze-sbom-line-8)">╭─</text><text class="breeze-sbom-r4" 
x="24.4" y="215.2" textLength="183" 
clip-path="url(#breeze-sbom-line-8)">&#160;SBOM&#160;commands&#160;</text><text 
class="breeze-sbom-r4" x="207.4" y="215.2" textLength="1232.2" 
clip-path="url(#breeze-sbom-line-8)">─────────────────────────────────────────────────────────────────────────────────────────────────────</text><text
 class="breeze-sbo [...]
+</text><text class="breeze-sbom-r4" x="0" y="239.6" textLength="12.2" 
clip-path="url(#breeze-sbom-line-9)">│</text><text class="breeze-sbom-r5" 
x="24.4" y="239.6" textLength="536.8" 
clip-path="url(#breeze-sbom-line-9)">update-sbom-information&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</text><text
 class="breeze-sbom-r2" x="585.6" y="239.6" textLength="854" 
clip-path="url(#breeze-sbom-line-9)">Update&#160;SB [...]
+</text><text class="breeze-sbom-r4" x="0" y="264" textLength="12.2" 
clip-path="url(#breeze-sbom-line-10)">│</text><text class="breeze-sbom-r5" 
x="24.4" y="264" textLength="536.8" 
clip-path="url(#breeze-sbom-line-10)">generate-provider-requirements&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</text><text
 class="breeze-sbom-r2" x="585.6" y="264" textLength="854" 
clip-path="url(#breeze-sbom-line-10)">Generate&#160;requirements&#160;for&#160;selected&#1
 [...]
+</text><text class="breeze-sbom-r4" x="0" y="288.4" textLength="1464" 
clip-path="url(#breeze-sbom-line-11)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
 class="breeze-sbom-r2" x="1464" y="288.4" textLength="12.2" 
clip-path="url(#breeze-sbom-line-11)">
 </text>
     </g>
     </g>
diff --git a/images/breeze/output_sbom_update-sbom-information.svg 
b/images/breeze/output_sbom_update-sbom-information.svg
index 992e6ca383..c83c80bfb4 100644
--- a/images/breeze/output_sbom_update-sbom-information.svg
+++ b/images/breeze/output_sbom_update-sbom-information.svg
@@ -155,7 +155,7 @@
 </text><text class="breeze-sbom-update-sbom-information-r2" x="12.2" y="93.2" 
textLength="85.4" 
clip-path="url(#breeze-sbom-update-sbom-information-line-3)">Update&#160;</text><text
 class="breeze-sbom-update-sbom-information-r4" x="97.6" y="93.2" 
textLength="48.8" 
clip-path="url(#breeze-sbom-update-sbom-information-line-3)">SBOM</text><text 
class="breeze-sbom-update-sbom-information-r2" x="146.4" y="93.2" 
textLength="451.4" 
clip-path="url(#breeze-sbom-update-sbom-information-line-3)">&#1 [...]
 </text><text class="breeze-sbom-update-sbom-information-r2" x="1464" y="117.6" 
textLength="12.2" clip-path="url(#breeze-sbom-update-sbom-information-line-4)">
 </text><text class="breeze-sbom-update-sbom-information-r5" x="0" y="142" 
textLength="24.4" 
clip-path="url(#breeze-sbom-update-sbom-information-line-5)">╭─</text><text 
class="breeze-sbom-update-sbom-information-r5" x="24.4" y="142" 
textLength="378.2" 
clip-path="url(#breeze-sbom-update-sbom-information-line-5)">&#160;Update&#160;SBOM&#160;information&#160;flags&#160;</text><text
 class="breeze-sbom-update-sbom-information-r5" x="402.6" y="142" 
textLength="1037" clip-path="url(#breeze-sbom- [...]
-</text><text class="breeze-sbom-update-sbom-information-r5" x="0" y="166.4" 
textLength="12.2" 
clip-path="url(#breeze-sbom-update-sbom-information-line-6)">│</text><text 
class="breeze-sbom-update-sbom-information-r6" x="24.4" y="166.4" 
textLength="12.2" 
clip-path="url(#breeze-sbom-update-sbom-information-line-6)">*</text><text 
class="breeze-sbom-update-sbom-information-r4" x="61" y="166.4" 
textLength="12.2" 
clip-path="url(#breeze-sbom-update-sbom-information-line-6)">-</text><text 
class=" [...]
+</text><text class="breeze-sbom-update-sbom-information-r5" x="0" y="166.4" 
textLength="12.2" 
clip-path="url(#breeze-sbom-update-sbom-information-line-6)">│</text><text 
class="breeze-sbom-update-sbom-information-r6" x="24.4" y="166.4" 
textLength="12.2" 
clip-path="url(#breeze-sbom-update-sbom-information-line-6)">*</text><text 
class="breeze-sbom-update-sbom-information-r4" x="61" y="166.4" 
textLength="12.2" 
clip-path="url(#breeze-sbom-update-sbom-information-line-6)">-</text><text 
class=" [...]
 </text><text class="breeze-sbom-update-sbom-information-r5" x="0" y="190.8" 
textLength="12.2" 
clip-path="url(#breeze-sbom-update-sbom-information-line-7)">│</text><text 
class="breeze-sbom-update-sbom-information-r4" x="61" y="190.8" 
textLength="12.2" 
clip-path="url(#breeze-sbom-update-sbom-information-line-7)">-</text><text 
class="breeze-sbom-update-sbom-information-r4" x="73.2" y="190.8" 
textLength="97.6" 
clip-path="url(#breeze-sbom-update-sbom-information-line-7)">-airflow</text><text
  [...]
 </text><text class="breeze-sbom-update-sbom-information-r5" x="0" y="215.2" 
textLength="12.2" 
clip-path="url(#breeze-sbom-update-sbom-information-line-8)">│</text><text 
class="breeze-sbom-update-sbom-information-r2" x="488" y="215.2" 
textLength="951.6" 
clip-path="url(#breeze-sbom-update-sbom-information-line-8)">versions)&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&
 [...]
 </text><text class="breeze-sbom-update-sbom-information-r5" x="0" y="239.6" 
textLength="12.2" 
clip-path="url(#breeze-sbom-update-sbom-information-line-9)">│</text><text 
class="breeze-sbom-update-sbom-information-r7" x="488" y="239.6" 
textLength="951.6" 
clip-path="url(#breeze-sbom-update-sbom-information-line-9)">(TEXT)&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#16
 [...]

Reply via email to