Skip to content

feat: adding changes feed api#1859

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

feat: adding changes feed api#1859
gnugomez wants to merge 3 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

public void setActive(boolean active) {
this.active = active;
setState(active ? State.ACTIVE : State.INACTIVE);
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.

issue: If for whatever reason the Version gets marked as DELETED without being set as inactive, this would clobber the DELETED flag on being set inactive. This would also clear a deleted flag if the flag was set DELETED first then had the active flag set to false. I think that setting the state automatically can be a bit dangerous as it could create non-obvious side effects, and we should instead just be intentional.


var content = query.fetch().map(row -> {
var extVersion = toExtensionVersionFull(row);
extVersion.setActive(row.get(EXTENSION_VERSION.ACTIVE));
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.

suggestion: This should probably be in the toExtensionVersionFull method as they aren't protected/sensitive fields. If you do that, this section could just become var content = query.fetch().map(this::toExtensionVersionFull);

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.

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