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: ignore hidden feature files #1353

Conversation

AhmedGrati
Copy link

Resolves #1337.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 8, 2023
@netlify
Copy link

netlify bot commented Sep 8, 2023

Deploy Preview for kubernetes-sigs-nfd ready!

Name Link
🔨 Latest commit 6c895b4
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-nfd/deploys/64ff201bbb5a070008f90672
😎 Deploy Preview https://deploy-preview-1353--kubernetes-sigs-nfd.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 8, 2023
@AhmedGrati
Copy link
Author

/cc @ArangoGutierrez @marquiz
ping @eero-t @tkatila.

@eero-t
Copy link

eero-t commented Sep 8, 2023

Please describe in docs also why hidden files should be used. This should preferably be in the same place as where NFD docs say that feature files should be updated atomically (as this change allows NFD client to write features to a dot file, and then atomically rename it to real feature file name).

@AhmedGrati AhmedGrati force-pushed the feat-ignore-hidden-feature-files branch from cd79f81 to ea855e6 Compare September 11, 2023 11:08
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 11, 2023
docs/usage/customization-guide.md Outdated Show resolved Hide resolved
@eero-t
Copy link

eero-t commented Sep 11, 2023

/lgtm

@k8s-ci-robot
Copy link
Contributor

@eero-t: changing LGTM is restricted to collaborators

In response to this:

/lgtm

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.

@AhmedGrati
Copy link
Author

AhmedGrati commented Sep 11, 2023

Thanks for the review @eero-t! ping @marquiz.

@AhmedGrati
Copy link
Author

/retest

Copy link
Contributor

@marquiz marquiz left a comment

Choose a reason for hiding this comment

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

Looking at the docs, we now promise that dot-files are ignored for both feature files and hooks. That's probably a good idea (even if hooks are deprecated), see my comments below

docs/usage/customization-guide.md Show resolved Hide resolved
docs/usage/customization-guide.md Outdated Show resolved Hide resolved
docs/usage/customization-guide.md Outdated Show resolved Hide resolved
@eero-t
Copy link

eero-t commented Sep 11, 2023

Looking at the docs, we now promise that dot-files are ignored for both feature files and hooks. That's probably a good idea (even if hooks are deprecated)

In the hook binary case, I would assume them to be moved to hook dir from somewhere else (e.g. installation container), which is atomic (at least as long as it's on the same file system) => IMHO dot file handling is not not really needed for hooks, but either updating doc again, or adding that feature also to hooks should both be fine.

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
@AhmedGrati AhmedGrati force-pushed the feat-ignore-hidden-feature-files branch from d0dd7b5 to 6c895b4 Compare September 11, 2023 14:11
@AhmedGrati
Copy link
Author

I added the same check to hooks also.

@eero-t
Copy link

eero-t commented Sep 11, 2023

Test for checking that normally named feature file is parsed, but one prefixed with dot is not, would also be good. This could be part of some other feature file test though, it does not necessarily need its own.

EDIT: ignore, I'm blind.

@marquiz
Copy link
Contributor

marquiz commented Sep 11, 2023

Test for checking that normally named feature file is parsed, but one prefixed with dot is not, would also be good. This could be part of some other feature file test though, it does not necessarily need its own.

But that is there already, afaiu

Copy link
Contributor

@marquiz marquiz left a comment

Choose a reason for hiding this comment

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

Thanks @AhmedGrati, looks good to me now
/assign @ArangoGutierrez

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 11, 2023
@AhmedGrati
Copy link
Author

ping @ArangoGutierrez

Copy link
Contributor

@ArangoGutierrez ArangoGutierrez left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 19, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 4621371e0a4137eb69bc3d7f2b93fe9968a0b4a7

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AhmedGrati, ArangoGutierrez, marquiz

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:
  • OWNERS [ArangoGutierrez,marquiz]

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

@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Merging #1353 (6c895b4) into master (b7aa0b2) will decrease coverage by 0.02%.
Report is 6 commits behind head on master.
The diff coverage is 50.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1353      +/-   ##
==========================================
- Coverage   30.03%   30.02%   -0.02%     
==========================================
  Files          56       56              
  Lines        7451     7457       +6     
==========================================
+ Hits         2238     2239       +1     
- Misses       4968     4974       +6     
+ Partials      245      244       -1     
Files Changed Coverage Δ
source/local/local.go 45.66% <50.00%> (+0.12%) ⬆️

... and 1 file with indirect coverage changes

@k8s-ci-robot k8s-ci-robot merged commit 2ea6d03 into kubernetes-sigs:master Sep 19, 2023
15 checks passed
@marquiz marquiz mentioned this pull request Dec 20, 2023
24 tasks
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create subdir for atomic feature file updates
6 participants