Skip to content

feat: adding changes feed api#1859

Open
gnugomez wants to merge 7 commits into
eclipse-openvsx:mainfrom
gnugomez:gnugomez/main/changes-feed-api
Open

feat: adding changes feed api#1859
gnugomez wants to merge 7 commits into
eclipse-openvsx:mainfrom
gnugomez:gnugomez/main/changes-feed-api

Conversation

@gnugomez
Copy link
Copy Markdown
Member

Related to #1854

@gnugomez gnugomez requested review from autumnfound and netomi May 21, 2026 14:49
@gnugomez gnugomez force-pushed the gnugomez/main/changes-feed-api branch from 84dbbb3 to e92c13d Compare May 21, 2026 15:34
entry.setName(ev.getExtension().getName());
entry.setVersion(ev.getVersion());
entry.setTargetPlatform(ev.getTargetPlatform());
entry.setState(ev.getState().name().toLowerCase());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

question: Is there a reason that we're modifying the enums on return? As these aren't aribitrary, we should probably just preserve the data as is and let the client do what they want with that data rather than make the assumption.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

so initially I wanted to match our convention, given that in other cases such as for the user role enum we return lowercased values, but thinking about it a bit more I'm realizing we do that there because these values weren't enums before.. so yeah I think returning uppercased enum values here its fine

wdyt @netomi ?

@gnugomez gnugomez force-pushed the gnugomez/main/changes-feed-api branch from d724d81 to 1b69cee Compare May 22, 2026 09:56
var version = new ExtensionVersion();
version.setState(ExtensionVersion.State.DELETED);

assertThrows(IllegalStateException.class, () -> version.setActive(false));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nitpick: We probably don't want to block setting a deleted version to inactive. This would create a weird condition where we always have to setActive before setState for deleted extensions otherwise the platform would throw exceptions. It might make sense if we force a pseudo-immutable state on the entity when the state is deleted, but right now we only enforce state and activity

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In my followup PR this stats making more sense, but basically you should not be able to change the state of an extension that has been deleted.

Right now when you use setState(ExtensionVersion.State.DELETED) internally is setting it to inactive already.

Since the extension is deleted and therefore not accessible anymore setActive(false) will try to change the state to ExtensionVersion.State.INACTIVE that is not equal to deleted.

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