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

PB-676: remove duplicate YAML key from spec. #422

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

adk-swisstopo
Copy link
Member

@adk-swisstopo adk-swisstopo commented Jun 20, 2024

As far as YAML is concerned, each key in a Map must be unique. The "example" Map has two keys named "title". This change removes one of the two duplicate keys.

An alternative fix would involve turning this into a list of examples. However the OpenAPI validator we use does not seem to support it at this time.

As far as YAML is concerned, each key in a Map must be unique. The "example" Map has two keys named "title". This change removes one of the two duplicate keys.

An alternative fix would involve turning this into a list of examples. However the OpenAPI validator we use does not seem to support it at this time.
Copy link
Contributor

@boecklic boecklic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks

@adk-swisstopo adk-swisstopo merged commit b79dff4 into develop Jun 20, 2024
5 checks passed
@adk-swisstopo adk-swisstopo deleted the fix-PB-676-duplicate-key branch June 20, 2024 14:04
@adk-swisstopo
Copy link
Member Author

Build failure: https://eu-central-1.console.aws.amazon.com/codesuite/codebuild/974517877189/projects/service-stac/build/service-stac%3A3857f1f4-1933-41c8-8974-756d48c584b3?region=eu-central-1

FAIL: test_collection_serialization (tests.tests_09.test_serializer.CollectionSerializationTestCase.test_collection_serialization)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/.pyenv/versions/3.12.2/lib/python3.12/unittest/case.py", line 58, in testPartExecutor
    yield
  File "/root/.pyenv/versions/3.12.2/lib/python3.12/unittest/case.py", line 634, in run
    self._callTestMethod(testMethod)
    ^^^^^^^^^^^^^^^^^
  File "/root/.pyenv/versions/3.12.2/lib/python3.12/unittest/case.py", line 589, in _callTestMethod
    if method() is not None:
    ^^^^^^^^^^^^^^^^^
  File "/codebuild/output/src1338/src/github.com/geoadmin/service-stac/app/tests/tests_09/test_serializer.py", line 138, in test_collection_serialization
    self.check_stac_collection(expected, python_native)
    ^^^^^^^^^^^^^^^^^
  File "/codebuild/output/src1338/src/github.com/geoadmin/service-stac/app/tests/tests_09/base_test.py", line 155, in check_stac_collection
    self._check_stac_dictsubset('collection', expected, current, ignore)
    ^^^^^^^^^^^^^^^^^
  File "/codebuild/output/src1338/src/github.com/geoadmin/service-stac/app/tests/tests_09/base_test.py", line 317, in _check_stac_dictsubset
    self._check_value(path, key, value, current, ignore)
    ^^^^^^^^^^^^^^^^^
  File "/codebuild/output/src1338/src/github.com/geoadmin/service-stac/app/tests/tests_09/base_test.py", line 442, in _check_value
    self.assertAlmostEqual(
    ^^^^^^^^^^^^^^^^^
  File "/root/.pyenv/versions/3.12.2/lib/python3.12/unittest/case.py", line 939, in assertAlmostEqual
    raise self.failureException(msg)
    ^^^^^^^^^^^^^^^^^
AssertionError: datetime.datetime(2024, 6, 20, 14, 11, 4, 334681, tzinfo=datetime.timezone.utc) != datetime.datetime(2024, 6, 20, 14, 11, 6, 762671, tzinfo=datetime.timezone.utc) within datetime.timedelta(seconds=2) delta (datetime.timedelta(seconds=2, microseconds=427990) difference) : collection.updated: current datetime value is not equal to the expected

This seems unlikely to be related.

@adk-swisstopo
Copy link
Member Author

The test passed when I triggered the build again: https://eu-central-1.console.aws.amazon.com/codesuite/codebuild/974517877189/projects/service-stac/build/service-stac%3A7fcb0352-d239-485a-ad4a-4c059a690adf/
I haven't seen this fail in the last 80 iterations or so. Looks like a flaky test. I have opened PB-694.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants