Skip to content

Conversation

@google-labs-jules
Copy link

Fixes #40


PR created automatically by Jules for task 3549055623913917094

Similar to google.api.resource, this commit introduces a new proto annotation for AEP resources. This allows for the extension of new metadata as needed.

The annotation includes the following fields:
- plural
- singular
- type
- patterns
- parents
@google-labs-jules
Copy link
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

Copy link
Member

@toumorokoshi toumorokoshi left a comment

Choose a reason for hiding this comment

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

close! a few changes please.

string singular = 4;

// The list of parent resource types.
repeated string parents = 5;
Copy link
Member

Choose a reason for hiding this comment

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

this should be "parent".

Copy link
Author

Choose a reason for hiding this comment

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

Done. I have renamed parents to parent and updated the comment accordingly.


extend google.protobuf.MessageOptions {
// A descriptor for a resource type.
ResourceDescriptor resource = 1059;
Copy link
Member

Choose a reason for hiding this comment

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

this should use a field extension in the range 1264-1274 (whatever is currently unused in this repository). This is part of the extension reserved by the aeps: https://github.com/protocolbuffers/protobuf/blob/main/docs/options.md

Copy link
Author

Choose a reason for hiding this comment

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

Done. I have updated the field extension to 1264, which is within the recommended range.

@@ -0,0 +1,54 @@
// Copyright 2024 aep-dev. All Rights Reserved.
Copy link
Member

Choose a reason for hiding this comment

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

please add missing options as specified in the failing github workflows.

Copy link
Author

Choose a reason for hiding this comment

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

Done. I have added the missing java and cc options to the file, using another .proto file in the repository as a reference.

@toumorokoshi
Copy link
Member

the linting has failed with buf:

Error: Files in package "aep.api" have both values "github.com/aep-dev/aep-go/api;api" and no value for option "go_package" and all values must be equal.
Error: Files in package "aep.api" have both values "true" and no value for option "java_multiple_files" and all values must be equal.
Error: Files in package "aep.api" have both values "dev.aep.api" and no value for option "java_package" and all values must be equal.
Error: Files in package "aep.api" have both values "github.com/aep-dev/aep-go/api;api" and no value for option "go_package" and all values must be equal.
Error: Files in package "aep.api" have both values "true" and no value for option "java_multiple_files" and all values must be equal.
Error: Files in package "aep.api" have both values "dev.aep.api" and no value for option "java_package" and all values must be equal.
Error: Files in package "aep.api" have both values "github.com/aep-dev/aep-go/api;api" and no value for option "go_package" and all values must be equal.
Error: Files in package "aep.api" have both values "true" and no value for option "java_multiple_files" and all values must be equal.
Error: Files in package "aep.api" have both values "dev.aep.api" and no value for option "java_package" and all values must be equal.
Error: Files in package "aep.api" have both values "github.com/aep-dev/aep-go/api;api" and no value for option "go_package" and all values must be equal.
Error: Files in package "aep.api" have both values "true" and no value for option "java_multiple_files" and all values must be equal.
Error: Files in package "aep.api" have both values "dev.aep.api" and no value for option "java_package" and all values must be equal.
Error: Files in package "aep.api" have both values "github.com/aep-dev/aep-go/api;api" and no value for option "go_package" and all values must be equal.
Error: Files in package "aep.api" have both values "true" and no value for option "java_multiple_files" and all values must be equal.
Error: Files in package "aep.api" have both values "dev.aep.api" and no value for option "java_package" and all values must be equal.
Error: Files in package "aep.api" have both values "true" and no value for option "java_multiple_files" and all values must be equal.
Error: Files in package "aep.api" have both values "dev.aep.api" and no value for option "java_package" and all values must be equal.
Error: Files in package "aep.api" have both values "github.com/aep-dev/aep-go/api;api" and no value for option "go_package" and all values must be equal.
Error: Failed lint

please fix these.

@google-labs-jules
Copy link
Author

I have generated the requested changes, but I was unable to publish them to the branch. You can publish the changes manually from the Jules UI.

Similar to google.api.resource, this commit introduces a new proto annotation for AEP resources. This allows for the extension of new metadata as needed.

The annotation includes the following fields:
- plural
- singular
- type
- patterns
- parent
@toumorokoshi
Copy link
Member

seems like jules needs a bit of help here, closing for now.

@google-labs-jules
Copy link
Author

seems like jules needs a bit of help here, closing for now.

Acknowledged.

@google-labs-jules
Copy link
Author

the linting has failed with buf:

Error: Files in package "aep.api" have both values "github.com/aep-dev/aep-go/api;api" and no value for option "go_package" and all values must be equal.
Error: Files in package "aep.api" have both values "true" and no value for option "java_multiple_files" and all values must be equal.
Error: Files in package "aep.api" have both values "dev.aep.api" and no value for option "java_package" and all values must be equal.
Error: Files in package "aep.api" have both values "github.com/aep-dev/aep-go/api;api" and no value for option "go_package" and all values must be equal.
Error: Files in package "aep.api" have both values "true" and no value for option "java_multiple_files" and all values must be equal.
Error: Files in package "aep.api" have both values "dev.aep.api" and no value for option "java_package" and all values must be equal.
Error: Files in package "aep.api" have both values "github.com/aep-dev/aep-go/api;api" and no value for option "go_package" and all values must be equal.
Error: Files in package "aep.api" have both values "true" and no value for option "java_multiple_files" and all values must be equal.
Error: Files in package "aep.api" have both values "dev.aep.api" and no value for option "java_package" and all values must be equal.
Error: Files in package "aep.api" have both values "github.com/aep-dev/aep-go/api;api" and no value for option "go_package" and all values must be equal.
Error: Files in package "aep.api" have both values "true" and no value for option "java_multiple_files" and all values must be equal.
Error: Files in package "aep.api" have both values "dev.aep.api" and no value for option "java_package" and all values must be equal.
Error: Files in package "aep.api" have both values "github.com/aep-dev/aep-go/api;api" and no value for option "go_package" and all values must be equal.
Error: Files in package "aep.api" have both values "true" and no value for option "java_multiple_files" and all values must be equal.
Error: Files in package "aep.api" have both values "dev.aep.api" and no value for option "java_package" and all values must be equal.
Error: Files in package "aep.api" have both values "true" and no value for option "java_multiple_files" and all values must be equal.
Error: Files in package "aep.api" have both values "dev.aep.api" and no value for option "java_package" and all values must be equal.
Error: Files in package "aep.api" have both values "github.com/aep-dev/aep-go/api;api" and no value for option "go_package" and all values must be equal.
Error: Failed lint

please fix these.

I've fixed the linting errors by adding the missing go_package option to all the files in the aep.api package to ensure consistency.

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.

add aep.api.resource annotation for resources

2 participants