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

feat: add license check #527

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

olexii4
Copy link

@olexii4 olexii4 commented Mar 11, 2025

What does this PR do?

Add license check.

What issues does this PR fix?

fixes eclipse-che/che#23363

How to test this PR?

Does this PR contain changes that override default upstream Code-OSS behavior?

  • the PR contains changes in the code folder (you can skip it if your changes are placed in a che extension )
  • the corresponding items were added to the CHANGELOG.md file
  • rules for automatic git rebase were added to the .rebase folder

Signed-off-by: Oleksii Orel <oorel@redhat.com>
Copy link

github-actions bot commented Mar 11, 2025

Click here to review and test in web IDE: Contribute

5. `@vscode/test-web@0.0.62`
6. `@vscode/vscode-perf@0.0.19`
7. `innosetup@6.0.5`
8. `postcss-nesting@12.0.2`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you clarify what are the next steps for the Unresolved dependencies?

Copy link
Author

Choose a reason for hiding this comment

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

@RomanNikitenko The file code/.deps/problems.md just for information. It shows current state. To remove libraries from unresolved dependencies list, we can harvest them using this link harvest or add libraries as exclusions in code/.deps/EXCLUDED/prod.md or code/.deps/EXCLUDED/dev.md files.

For example: https://github.com/eclipse-che/che-dashboard/blob/main/.deps/EXCLUDED/dev.md

Copy link
Collaborator

Choose a reason for hiding this comment

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

There are 12 unresolved deps with @vscode prefix - could you clarify why they are unresolved?
did you try to apply harvest approach for them?

Copy link

@vitaliy-guliy
Copy link
Contributor

Honestly, I do not have the whole picture of what this PR does.

Could we instead of adding all those files, add only one GitHub action, that will be triggered by pushing to the main branch (or pull request)? The action should not block anything and its successful execution may be represented as a badge in the README file.

@olexii4
Copy link
Author

olexii4 commented Mar 12, 2025

Honestly, I do not have the whole picture of what this PR does.

Could we instead of adding all those files, add only one GitHub action, that will be triggered by pushing to the main branch (or pull request)? The action should not block anything and its successful execution may be represented as a badge in the README file.

@vitaliy-guliy We have some information here che-incubator/dash-licenses:

...
Update dependency info
The following command generates dependencies info of a project and then checks all found dependencies. It returns a non-zero exit code if any of them are restricted to use.

docker run --rm -t \
       -v ${PWD}/:/workspace/project  \
       quay.io/che-incubator/dash-licenses:next

As a result, this command creates the next files:

  • prod.md with the list of production dependencies;
  • dev.md which contains only build and test dependencies;
  • problems.md will be created if some dependencies are not covered with CQ, unnecessary excludes present, etc.

Check dependencies
If you just need to verify that all dependencies satisfy IP requirements, use the --check flag, like the following

docker run --rm -t \
       -v ${PWD}/:/workspace/project  \
       quay.io/che-incubator/dash-licenses:next --check

So, this command doesn't create any new files in the project directory (except a temporary one) but checks if the dependencies info is up-to-date and then validates all found dependencies. It returns a non-zero exit code if any of the dependencies are restricted to use.
...

Files prod.md and dev.md include license information for libraries. for example:

Production dependencies

Packages License Resolved CQs
@vscode/sqlite3@5.1.8-vscode BSD-3-Clause clearlydefined
...

You can click a link with CQ and the next page will be opened

Знімок екрана 2025-03-12 о 15 20 20

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.

[che-code] Add a GitHub job to check licenses for using libraries for PRs
3 participants