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

Error Publishing API via CLI #1127

Open
aymanhouadria opened this issue Apr 2, 2024 · 9 comments
Open

Error Publishing API via CLI #1127

aymanhouadria opened this issue Apr 2, 2024 · 9 comments
Labels
kind/question stale State due to inactivity

Comments

@aymanhouadria
Copy link

Describe the bug

We have three instances of Microcks: dev, pre, and prod. For some reason, publishing APIs via CLI in our dev instance no longer works. In versions 0.5.3 and 0.5.4, no error appears, but it doesn't discover any service. An empty string appears instead: image. In version 0.5.5, it throws the following error:
image
We have verified that the client id, client secret, and URLs are correct. The file is also in the correct path. Interestingly, it works in the other instances.

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Microcks version or git rev

No response

Install method (docker-compose, helm chart, operator, docker-desktop extension,...)

No response

Additional information

No response

Copy link

github-actions bot commented Apr 2, 2024

👋 @aymanhouadria

Welcome to the Microcks community! 💖

Thanks and congrats 🎉 for opening your first issue here! Be sure to follow the issue template or please update it accordingly.

📢 If you're using Microcks in your organization, please add your company name to this list. 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact.

If you need to know why and how to add yourself to the list, please read the blog post "Join the Microcks Adopters list and Empower the vibrant open source Community 🙌"

Hope you have a great time there!

🌟 ~~~~~~~~~ 🌟

📢 If you like Microcks, please ⭐ star ⭐ our repo to support it!

🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact.

@lbroudoux
Copy link
Member

Hey @aymanhouadria!

Thanks for raising this issue. The latest 0.5.5 release of microcks-cli actually fixes a bug in reporting a failure during import. See microcks/microcks-cli#39.

Where you previously thought the import was ok but had a message like Microcks has discovered '', it was actually an error as the import failed and the server didn't send back the name and version of a discovered API. It has been fixed in 0.5.5, and the CLI exits with code 1, which translates as a failure at the OS level.

Let me know if it makes sense.

@aymanhouadria
Copy link
Author

Thank you for the response. Yes, we tried with version 0.5.5 and indeed we are getting an error, both locally and in CI. What we don't understand is that we haven't modified anything in our dev instance of Microcks, yet it has stopped publishing via CLI. The error does not specify the reason, and the client ID, URL, and client secret are correct. The OpenAPI is also in the correct path. I'm asking to see if a similar problem has been reported or if you are aware of an issue like this because we can't think of where to look to understand the reason for the error. Thank you very much.

@lbroudoux
Copy link
Member

You can try to put the --verbose=true flag to get dumps of the requests/responses of API calls.

@aymanhouadria
Copy link
Author

Thank you again for the response. We have already used the verbose flag, and it throws a 403 with an error="insufficient_scope". The issue is that we haven't changed anything in our client's configuration for months, and upon checking, it is identical to our other instances where the CLI does work. The privileges are the same as before, so honestly, we are running out of ideas on where to look.
image
image
image

The configuration shown in the screenshots is identical for all our instances, but only the development environment is throwing an error. Do you have any suggestions on where I could look to find the problem?

@lbroudoux
Copy link
Member

We've fixed a permission issue in latest versions of Microcks so it could effectively make your import no longer work... Please check that the service account used by the CLI holds the manager role of microcks resource. Please check https://microcks.io/documentation/automating/service-account/ to verify on your side.

@aymanhouadria
Copy link
Author

Thank you very much. Last attempt. We have checked and indeed, as before, the assigned roles are correct and we have not updated our Microcks for the moment. I have verified that everything is correct as indicated in the documentation you have provided, and it is. If, for some reason, you think of where the problem might be, we would appreciate the help. Best regards

image
image

@lbroudoux
Copy link
Member

In the above screenshot, I can only see the default-roles-microcks-dev being assigned to the service account, and these default roles only embed the user role. I think you should explicitly add the manager role attached to the microcks-app resource to get it working.

Copy link

github-actions bot commented May 6, 2024

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

It will be closed in 30 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. Microcks is a Cloud Native Computing 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 ❤️

@github-actions github-actions bot added the stale State due to inactivity label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question stale State due to inactivity
Projects
None yet
Development

No branches or pull requests

2 participants