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

Implement Project config endpoints #208

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Conversation

PMooreWand
Copy link
Contributor

Adding implementation of project/config.
Get and Put commands implemented.
Added new parser method to ProjectsParser.
Added new tests to ProjectParserTest and
ProjectApiClientTest

@PMooreWand
Copy link
Contributor Author

Closing pull for now trusted example in gerrit docs but gson parsing fails to map the extensionspanel map from json. Closing until get that resolved

@PMooreWand PMooreWand closed this Nov 22, 2023
@uwolfer
Copy link
Owner

uwolfer commented Nov 22, 2023

@PMooreWand Does it fail in Gerrit itself? Also using a curl command? Then you should report it against Gerrit IMO.

@PMooreWand
Copy link
Contributor Author

PMooreWand commented Nov 22, 2023

It's Gson deserialisation the ConfigInfo between 2.16 and 3.7 changed from
public Map<String, List<String>> extensionPanelNames;
to
public ImmutableMap<String, ImmutableList<String>> extensionPanelNames;
So probably more the case that I can not just call gson.fromJson without more logic for the mapping.

@uwolfer
Copy link
Owner

uwolfer commented Nov 22, 2023

So probably more the case that I can not just call gson.fromJson without more logic for the mapping.

Not sure, but probably this helps in your case? https://stackoverflow.com/questions/13623175/deserialize-to-an-immutablemap-with-gson

@uwolfer
Copy link
Owner

uwolfer commented Nov 28, 2023

Happy to see that you were able to resolve the issue. Could you please reformat the newly created code (there are some minor code style inconsistencies mostly related to white spaces)?

Adding implementation of project/config.
Get and Put commands implemented.
Added new parser method to ProjectsParser.
Created TypeAdaptor to handle the only
instanece of Immutable list on ConfigInfo
Added new tests to ProjectParserTest and
ProjectApiClientTest
@uwolfer uwolfer merged commit e0eaeb7 into uwolfer:master Nov 29, 2023
3 checks passed
@PMooreWand PMooreWand deleted the configInfo branch November 30, 2023 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants