asyncapi-react icon indicating copy to clipboard operation
asyncapi-react copied to clipboard

AsyncAPI Studio automated updates broken

Open derberg opened this issue 1 year ago • 17 comments

Looks to me like https://github.com/asyncapi/studio/blob/master/apps/studio/package.json#L44 is running on very old react component version which is not good.

Its confusing people for very long, look: https://studio.asyncapi.com/?share=3469f1ef-eae6-4e23-a53c-f4d2877fd857 it still runs on version there reverts meaning of action verbs :(

So one thing is to update the component in studio, another is to automate it.

Current automation do not work: https://github.com/asyncapi/asyncapi-react/blob/master/.github/workflows/bump.yml

It is because it uses the default workflow from .github that is using default location of package.json from root, to grab package name. The workflow needs an update here or in .github but then we need to figure out, hot to overwrite default packagejson_path with custom value, like ./library. Probably environment variables.

cc @Shurtu-gal so he is aware of issues in Studio.

derberg avatar Dec 17 '24 00:12 derberg

Its confusing people for very long, look: https://studio.asyncapi.com/?share=3469f1ef-eae6-4e23-a53c-f4d2877fd857 it still runs on version there reverts meaning of action verbs :(

actually it is a different weird bug. The switch of verbs happens only if reply is present. If I remove reply, the verb shows as SEND not RECEIVE

derberg avatar Dec 17 '24 00:12 derberg

I will take a look into this this weekend.

Shurtu-gal avatar Dec 20 '24 09:12 Shurtu-gal

@Shurtu-gal did you have a chance to have a look into it?

derberg avatar Jan 08 '25 16:01 derberg

Sorry, I was actually travelling to college 2 weeks ago and was down with fever after that.

I will put this on priority. Had totally forgotten about this.

Shurtu-gal avatar Jan 08 '25 17:01 Shurtu-gal

Regarding the bump workflow should we make it customisable to make it work in monorepos?

Or we can simply find package.json to max depth of 3 as I suppose that would be enough.

Shurtu-gal avatar Jan 08 '25 17:01 Shurtu-gal

actually it is a different weird bug. The switch of verbs happens only if reply is present. If I remove reply, the verb shows as SEND not RECEIVE

I believe that this is a problem in asyncapi-react, as the parsed spec looks alright. I will look into this repo's code and update here.

Shurtu-gal avatar Jan 08 '25 20:01 Shurtu-gal

After some digging around found the reason: https://github.com/asyncapi/asyncapi-react/blob/master/library/src/helpers/common.ts#L21-L28

Whenever a operation has reply according to this it should show REQUEST.

cc: @derberg

Shurtu-gal avatar Jan 08 '25 20:01 Shurtu-gal

Hello, @Shurtu-gal! 👋🏼

I'm 🧞🧞🧞 Genie 🧞🧞🧞 from the magic lamp. Looks like somebody needs a hand!

At the moment the following comments are supported in issues:

  • /good-first-issue {js | ts | java | go | docs | design | ci-cd} or /gfi {js | ts | java | go | docs | design | ci-cd} - label an issue as a good first issue. example: /gfi js or /good-first-issue ci-cd

asyncapi-bot avatar Jan 08 '25 20:01 asyncapi-bot

@Shurtu-gal but the problem if the issue is not that it is done wrong here, but that it is still visible wrong in studio as studio runs on old version. Or?

derberg avatar Jan 08 '25 20:01 derberg

I upgraded to the latest version still the problem is there.

Also tried in the demo url in this repo

Shurtu-gal avatar Jan 08 '25 20:01 Shurtu-gal

I upgraded to the latest version still the problem is there.

you mean on your local right?

derberg avatar Jan 13 '25 08:01 derberg

Yeah

Shurtu-gal avatar Jan 13 '25 09:01 Shurtu-gal

ah, ok, looks like it was changed intentionally.

problem is that verb Request do not imply if it is inbound or outbound, so the reply you have specified, it is hard to identify if reply is to incomming request or a reply from server to outgoing request.

@jonaslagoni do you remember why in https://github.com/asyncapi/asyncapi-react/pull/856 you introduced REQUEST label by default?

derberg avatar Jan 13 '25 10:01 derberg

ah, ok, looks like it was changed intentionally.

problem is that verb Request do not imply if it is inbound or outbound, so the reply you have specified, it is hard to identify if reply is to incomming request or a reply from server to outgoing request.

Should this be changed then?

Shurtu-gal avatar Mar 13 '25 10:03 Shurtu-gal

I think so, but not as part of this issue I guess, this one is different, about automation

derberg avatar Mar 13 '25 12:03 derberg

@derberg instead of overwriting the workflow here, i think we should do it in the main workflow repo. We'll update the job where the package version is being read from, then dynamically use an env variable to set the package json path.

AceTheCreator avatar Mar 25 '25 14:03 AceTheCreator

ah, ok, looks like it was changed intentionally.

problem is that verb Request do not imply if it is inbound or outbound, so the reply you have specified, it is hard to identify if reply is to incomming request or a reply from server to outgoing request.

@jonaslagoni do you remember why in #856 you introduced REQUEST label by default?

@derberg can you provide a spec example i can look at to have a better understanding of the present issue?

AceTheCreator avatar Mar 25 '25 14:03 AceTheCreator

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Jul 24 '25 00:07 github-actions[bot]