FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: fix_poms.py to add one line in versions.txt for new library by suztomo · Pull Request #3994 · googleapis/sdk-platform-java · GitHub

This repository was archived by the owner on May 14, 2026. It is now read-only.

fix: fix_poms.py to add one line in versions.txt for new library - #3994

Draft
suztomo wants to merge 9 commits into
googleapis:mainfrom
suztomo:one_version_in_google-cloud-java_per_module
Draft

fix: fix_poms.py to add one line in versions.txt for new library#3994
suztomo wants to merge 9 commits into
googleapis:mainfrom
suztomo:one_version_in_google-cloud-java_per_module

Conversation

suztomo commented Nov 27, 2025

Copy link
Copy Markdown
Member
  • fix: hermetic build to create one line per new library
  • format
  • fix: fix_poms.py to add one line in versions.txt for new library

product-auto-label Bot added the size: m Pull request size is medium. label Nov 27, 2025

suztomo commented Dec 2, 2025
edited
Loading

Copy link
Copy Markdown
Member Author

https://pantheon.corp.google.com/cloud-build/builds;region=us-central1/cdd4796e-db91-4dd1-9a1f-5468ddccc0e4;step=5?project=java-hermetic-build-prod failed at https://github.com/googleapis/sdk-platform-java/blob/main/.cloudbuild/library_generation/scripts/integration_tests.py#L97 :

            self.assertFalse(
                self.compare_xml(
                    f"{golden_dir}/gapic-libraries-bom/pom.xml",
                    f"{repo_dest}/gapic-libraries-bom/pom.xml",
                    False,
                )
only in /workspace/golden/gapic-libraries-bom/pom.xml
--
  | //project/version=1.36.0-SNAPSHOT: 1
  | //project/parent/version=1.36.0-SNAPSHOT: 1
  | only in /workspace/google-cloud-java/gapic-libraries-bom/pom.xml
  | //project/version=0.20.0-SNAPSHOT: 1
  | //project/parent/version=0.20.0-SNAPSHOT: 1
  | F
  | ======================================================================
  | FAIL: test_monorepo_generation (integration_tests.IntegrationTest.test_monorepo_generation)
  | ----------------------------------------------------------------------
  | Traceback (most recent call last):
  | File "/workspace/.cloudbuild/library_generation/scripts/integration_tests.py", line 97, in test_monorepo_generation
  | self.assertFalse(
  | AssertionError: True is not false
  |  
  | ----------------------------------------------------------------------
  | Ran 1 test in 0.030s

``

suztomo commented Dec 2, 2025
edited
Loading

Copy link
Copy Markdown
Member Author

https://github.com/googleapis/sdk-platform-java/actions/runs/19856753643/job/56896501729?pr=3994

FAIL: test_generate_postprocessing_prerequisite_files_monorepo_success (library_generation.tests.utilities_unit_tests.UtilitiesTest.test_generate_postprocessing_prerequisite_files_monorepo_success)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/google/home/suztomo/sdk-platform-java/hermetic_build/library_generation/tests/utilities_unit_tests.py", line 214, in test_generate_postprocessing_prerequisite_files_monorepo_success
    file_comparator.compare_files(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        f"{library_path}/owlbot.py", f"{library_path}/owlbot-golden.py"
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/google/home/suztomo/sdk-platform-java/hermetic_build/library_generation/tests/test_utils.py", line 29, in compare_files
    self.assertEqual(
    ~~~~~~~~~~~~~~~~^
        first=[], second=diff, msg="Unexpected file contents:\n" + "".join(diff)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: Lists differ: [] != ['--- \n', '+++ \n', '@@ -21,16 +21,19 @@\[829 chars])\n']

Second list contains 35 additional elements.
First extra element 0:
'--- \n'

Diff is 986 characters long. Set self.maxDiff to None to see it. : Unexpected file contents:
--- 
+++ 
@@ -21,16 +21,19 @@
     s.move(library)
 
 s.remove_staging_dirs()
-java.common_templates(monorepo=True, excludes=[
-    ".github/*",
-    ".kokoro/*",
-    "samples/*",
-    "CODE_OF_CONDUCT.md",
-    "CONTRIBUTING.md",
-    "LICENSE",
-    "SECURITY.md",
-    "java.header",
-    "license-checks.xml",
-    "renovate.json",
-    ".gitignore"
-])+java.common_templates(
+    monorepo=True,
+    excludes=[
+        ".github/*",
+        ".kokoro/*",
+        "samples/*",
+        "CODE_OF_CONDUCT.md",
+        "CONTRIBUTING.md",
+        "LICENSE",
+        "SECURITY.md",
+        "java.header",
+        "license-checks.xml",
+        "renovate.json",
+        ".gitignore",
+    ],
+)


(.venv) suztomo@suztomo:~/sdk-platform-java$ python -m unittest discover -s hermetic_build -p '*unit_tests.py' can reproduce the issue.

It looks formating difference.

:

java.common_templates(monorepo=True, excludes=[
    ".github/*",

monorepo=True is in the same line as java.common_templates(, while

{% if should_include_templates %}java.common_templates(monorepo=True, {% if template_excludes %}excludes=[
has:

{% if should_include_templates %}java.common_templates(monorepo=True, {% if template_excludes %}excludes=[

monorepo=True is in the same line as java.common_templates(.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL