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

632-devfile annotation support in generators #123

Merged
merged 7 commits into from
Nov 22, 2021

Conversation

yangcao77
Copy link
Collaborator

@yangcao77 yangcao77 commented Nov 8, 2021

What does this PR do?:

This PR is for devfile annotation support.

Which issue(s) this PR fixes:

Fixes devfile/api#632
Fixes devfile/api#675

PR acceptance criteria:

Testing and documentation do not need to be complete in order for this PR to be approved. We just need to ensure tracking issues are opened.

  • Open new test/doc issues under the devfile/api repo
  • Check each criteria if:
  • There is a separate tracking issue. Add the issue link under the criteria
    or
  • test/doc updates are made as part of this PR
  • If unchecked, explain why it's not needed

How to test changes / Special notes to the reviewer:

Signed-off-by: Stephanie <yangcao@redhat.com>
Signed-off-by: Stephanie <yangcao@redhat.com>
Signed-off-by: Stephanie <yangcao@redhat.com>
Signed-off-by: Stephanie <yangcao@redhat.com>
Copy link
Contributor

@kim-tsao kim-tsao left a comment

Choose a reason for hiding this comment

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

We should include some coverage for parent/plugin Annotation overrides in the parse_test.go

Signed-off-by: Stephanie <yangcao@redhat.com>
@yangcao77
Copy link
Collaborator Author

We should include some coverage for parent/plugin Annotation overrides in the parse_test.go

@kim-tsao I've pushed a new commit to add annotation field in plugin & parent override tests.

@openshift-ci
Copy link

openshift-ci bot commented Nov 9, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kim-tsao, yangcao77

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yangcao77
Copy link
Collaborator Author

@kadel Can you also help review if this PR addresses Odo's request.

@feloy
Copy link
Contributor

feloy commented Nov 16, 2021

@kadel Can you also help review if this PR addresses Odo's request.

@yangcao77 Testing with odo, I can see that the annotation field is added to v2.0.0 and v2.1.0 devfiles also, for example:

components:
- container:
    annotation: {}
    endpoints:
    - name: http-3000
      targetPort: 3000
    image: registry.access.redhat.com/ubi8/nodejs-14:latest
    memoryLimit: 1024Mi
    mountSources: true
    sourceMapping: /project
  name: runtime
[...]
schemaVersion: 2.0.0

@yangcao77
Copy link
Collaborator Author

yangcao77 commented Nov 16, 2021

@kadel Can you also help review if this PR addresses Odo's request.

@yangcao77 Testing with odo, I can see that the annotation field is added to v2.0.0 and v2.1.0 devfiles also, for example:

components:
- container:
    annotation: {}
    endpoints:
    - name: http-3000
      targetPort: 3000
    image: registry.access.redhat.com/ubi8/nodejs-14:latest
    memoryLimit: 1024Mi
    mountSources: true
    sourceMapping: /project
  name: runtime
[...]
schemaVersion: 2.0.0

@feloy How did you get this content? you are using devfile writer? This should be a bug, and I will need to submit another PR in api to fix that. (devfile/api#682) Thanks for pointing out.

annotations are not added to devfile v2.0.0 or v2.1.0, and we are not planning to do that.
https://github.com/devfile/api/blob/2.0.x/schemas/latest/devfile.json
https://github.com/devfile/api/blob/2.1.x/schemas/latest/devfile.json

Signed-off-by: Stephanie <yangcao@redhat.com>
@openshift-ci
Copy link

openshift-ci bot commented Nov 16, 2021

New changes are detected. LGTM label has been removed.

@openshift-ci openshift-ci bot removed the lgtm label Nov 16, 2021
@yangcao77
Copy link
Collaborator Author

yangcao77 commented Nov 16, 2021

@feloy The annotation problem with writer should be fixed by the new commit in this PR, can you help test again? Thanks.

@feloy
Copy link
Contributor

feloy commented Nov 17, 2021

@feloy The annotation problem with writer should be fixed by the new commit in this PR, can you help test again? Thanks.

@yangcao77 yes, the problem is fixed with this commit, thanks

Signed-off-by: Stephanie <yangcao@redhat.com>
@yangcao77 yangcao77 merged commit de02f78 into devfile:main Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants