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

Watch for devfile dependencies #6020

Conversation

feloy
Copy link
Contributor

@feloy feloy commented Aug 11, 2022

What type of PR is this:

/kind bug

What does this PR do / why we need it:

Which issue(s) this PR fixes:

Fixes #6017

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 11, 2022
@openshift-ci openshift-ci bot requested review from anandrkskd and rm3l August 11, 2022 08:24
@feloy feloy changed the title Feature 5867/get devfile deps Watch for devfile dependencies Aug 11, 2022
@netlify
Copy link

netlify bot commented Aug 11, 2022

Deploy Preview for odo-docusaurus-preview canceled.

Name Link
🔨 Latest commit 9334e83
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/62f4c4cd05f1a00009039d2c

@feloy feloy requested review from valaparthvi and removed request for anandrkskd August 11, 2022 08:25
@odo-robot
Copy link

odo-robot bot commented Aug 11, 2022

Validate Tests on commit b2e2f3d finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Aug 11, 2022

Unit Tests on commit b2e2f3d finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Aug 11, 2022

Windows Tests (OCP) on commit b2e2f3d finished with errors.
View logs: TXT HTML

@feloy feloy force-pushed the feature-5867/get-devfile-deps branch from 128ada9 to c21cae3 Compare August 11, 2022 08:38
@odo-robot
Copy link

odo-robot bot commented Aug 11, 2022

OpenShift Tests on commit b2e2f3d finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Aug 11, 2022

Kubernetes Tests on commit b2e2f3d finished successfully.
View logs: TXT HTML

@feloy feloy force-pushed the feature-5867/get-devfile-deps branch from c21cae3 to 9334e83 Compare August 11, 2022 08:58
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

if err != nil {
return nil, err
}
if u.Scheme == "" {
Copy link
Member

Choose a reason for hiding this comment

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

Just curious - is the file URI scheme something possible here to reference local files? Or should we always expect files relative to the devfile.yaml? The Devfile spec is pretty vague about this:

Location in a file fetched from a uri.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm pretty sure it is related to the directory containing the devfile. For example, the doc for parent URI is:

URI Reference of a parent devfile YAML file. It can be a full URL or a relative URI with the current devfile as the base URI.

for _, f := range devfileFiles {
err = devfileWatcher.Add(f)
if err != nil {
klog.V(4).Infof("error adding watcher for path %s: %v", f, err)
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we return the error right away instead? Or maybe make the error more visible to the user by logging it as a warning?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I first started with returning the error, but lots of integration tests fail, because they are using Devfiles containing URIs but withtout the corresponding file.

I would prefer the error to be handled by the devfile validation. I consider that if the devfile validation does not complain, we should not here.

@feloy feloy requested a review from rm3l August 16, 2022 06:40
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Aug 16, 2022
@valaparthvi
Copy link
Contributor

/approve
/override windows-integration-test/Windows-test

@openshift-ci
Copy link

openshift-ci bot commented Aug 17, 2022

@valaparthvi: Overrode contexts on behalf of valaparthvi: windows-integration-test/Windows-test

In response to this:

/approve
/override windows-integration-test/Windows-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci
Copy link

openshift-ci bot commented Aug 17, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: valaparthvi

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label Aug 17, 2022
@openshift-merge-robot openshift-merge-robot merged commit 04dec85 into redhat-developer:main Aug 17, 2022
feloy added a commit to feloy/odo that referenced this pull request Aug 18, 2022
cdrage pushed a commit to cdrage/odo that referenced this pull request Aug 31, 2022
* GetReferencedLocalFiles

* Watch for all devfile dependencies

* Integration test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

odo dev does not react on devfile parent change
4 participants