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

BE: Chore: standarize Protobuf import paths #723

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

yeikel
Copy link
Contributor

@yeikel yeikel commented Dec 23, 2024

What changes did you make? (Give an overview)

Before this change, the SchemaRegistryServiceTests tests were failing in Windows with the following exception:

image

	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:782)
	... 55 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.kafbat.ui.service.DeserializationService]: Constructor threw exception
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:221)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:117)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:315)
	... 69 more
Caused by: java.lang.NullPointerException: ProtoFile not found for import 'language/language.proto'
	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:1011)
	at io.kafbat.ui.serdes.builtin.ProtobufFileSerde$ProtoSchemaLoader$1.load(ProtobufFileSerde.java:403)
	at com.squareup.wire.schema.Linker.getFileLinker$wire_schema(Linker.kt:95)

With this change, we are standardizing the import statements to remove backlashes in Windows which fixes the tests :

image

How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

  • Manually (please, describe, if necessary)
  • Unit checks
  • Covered by existing automation

Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings (e.g. Sonar is happy)
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

A picture of a cute animal (not mandatory but encouraged)
istockphoto-1243410279-612x612

@kapybro kapybro bot added status/triage Issues pending maintainers triage status/triage/manual Manual triage in progress status/triage/completed Automatic triage completed and removed status/triage Issues pending maintainers triage labels Dec 23, 2024
@yeikel yeikel force-pushed the chore/standarize-path branch from e8c07c6 to 54381fe Compare December 23, 2024 17:18
@yeikel yeikel force-pushed the chore/standarize-path branch from 54381fe to c62d11b Compare December 23, 2024 17:19
@yeikel yeikel changed the title BE: standarize import paths BE: Chore: standarize import paths Dec 23, 2024
@yeikel yeikel marked this pull request as ready for review December 23, 2024 17:28
@yeikel yeikel requested a review from a team as a code owner December 23, 2024 17:28
@yeikel yeikel changed the title BE: Chore: standarize import paths BE: Chore: standarize Protobuff import paths Dec 23, 2024
@yeikel yeikel changed the title BE: Chore: standarize Protobuff import paths BE: Chore: standarize Protobuf import paths Dec 23, 2024
@@ -426,6 +427,27 @@ private Map<String, ProtoFile> loadFilesWithLocations() {
}
return filesByLocations;
}

/**
Copy link
Member

Choose a reason for hiding this comment

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

Do we keep this until the issue is resolved on wire side? Or is this a different issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure what issue you are referring to

I noticed this problem locally when I ran these tests manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/triage/completed Automatic triage completed status/triage/manual Manual triage in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants