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

[No Ticket] Fix "Property name is not allowed" error for RPM deps #1199

Merged
merged 4 commits into from
May 24, 2023

Conversation

gilfaizon
Copy link
Contributor

Overview

This PR should hopefully fix a tiny issue with the fossa-deps schema that's been bugging me for some time.

When using a fossa-deps.yml file with an RPM dependency, the "name" field would be deemed invalid.

Acceptance criteria

No more squiggly red lines! Names are valid, and should be considered as such.

Testing plan

With JSON and YAML Schema Download enabled in VSC, create a fossa-deps.yml file with the following:

referenced-dependencies:
- type: rpm-generic
  name: cpio
  os: sles
  osVersion: "15.4"
  arch: x86_64
  version: 0:2.13-9.fc34

Open the file in VSC, it should inform you that "Property name is not allowed"

After checking out this branch, or downloading the fossa-deps.schema.json file:

  1. Open your VSC Settings
  2. Search for "Schema"
  3. Select "Yaml: Schemas" > "Edit in settings.json"
  4. Add the following:
"yaml.schemas": {
            "file:/path/to/folder/fossa-cli/docs/references/files/fossa-deps.schema.json": "fossa-deps.yml"
        }

Risks

I'm not sure if I need to change anything else, can reviewers please confirm whether I need to modify any additional files to reflect the change?

I also don't know if this will actualy fix the issue! Tested locally, but unsure what needs to be done for the changes to propagate.

References

No references.

Checklist

  • I added tests for this PR's change (or explained in the PR description why tests don't make sense).
  • If this PR introduced a user-visible change, I added documentation into docs/.
  • If this change is externally visible, I updated Changelog.md. If this PR did not mark a release, I added my changes into an # Unreleased section at the top.
  • If I made changes to .fossa.yml or fossa-deps.{json.yml}, I updated docs/references/files/*.schema.json. You may also need to update these if you have added/removed new dependency type (e.g. pip) or analysis target type (e.g. poetry).

@gilfaizon gilfaizon requested a review from a team as a code owner May 19, 2023 18:09
@gilfaizon gilfaizon requested a review from zlav May 19, 2023 18:09
@CLAassistant
Copy link

CLAassistant commented May 19, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@jssblck jssblck left a comment

Choose a reason for hiding this comment

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

lgtm, but please make an entry in the changelog. Just do something like this, and we'll bundle it in the changelog of the next versioned release:

### Unreleased

- Doc only: fixed issue in `fossa-deps` schema preventing use of `name` for referenced RPM dependencies [#1199](https://github.com/fossas/fossa-cli/pull/1199).

I don't think we propagate these files anywhere else, I think we just provide them for users to configure if they want.

@gilfaizon gilfaizon enabled auto-merge (squash) May 24, 2023 20:24
@gilfaizon gilfaizon merged commit 87fd04b into master May 24, 2023
17 checks passed
@gilfaizon gilfaizon deleted the fix_rpm_name_schema branch May 24, 2023 20:55
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.

None yet

3 participants