Skip to content

CFE-4074: Added a new input-type: file - #330

Open
SimonThalvorsen wants to merge 1 commit into
cfengine:masterfrom
SimonThalvorsen:ENT4074
Open

CFE-4074: Added a new input-type: file#330
SimonThalvorsen wants to merge 1 commit into
cfengine:masterfrom
SimonThalvorsen:ENT4074

Conversation

@SimonThalvorsen

@SimonThalvorsen SimonThalvorsen commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Ticket: CFE-4074

@cf-bottom

Copy link
Copy Markdown

Thank you for submitting a pull request! Maybe @craigcomstock can review this?

@SimonThalvorsen
SimonThalvorsen marked this pull request as draft August 4, 2026 14:25
@SimonThalvorsen
SimonThalvorsen marked this pull request as ready for review August 6, 2026 10:54
@SimonThalvorsen
SimonThalvorsen requested a review from larsewi August 7, 2026 09:01

@larsewi larsewi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread cfbs/build.py Outdated
Comment thread cfbs/build.py Outdated
Ticket: CFE-4074
Signed-off-by: Simon Halvorsen <simon.halvorsen@northern.tech>
@SimonThalvorsen SimonThalvorsen changed the title ENT-4074: Added a new input-type: file CFE-4074: Added a new input-type: file Aug 7, 2026
@SimonThalvorsen
SimonThalvorsen requested a review from larsewi August 7, 2026 13:55

@larsewi larsewi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would like @nickanderson or @olehermanse to review this before we merge

Comment thread cfbs/build.py
Comment on lines +259 to +260
if os.path.commonpath([abs_path, module_root]) != module_root:
continue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A comment here would be nice

Comment thread cfbs/build.py


def _perform_input_step(args, name, destination, prefix):
def _path_if_already_shipped(path, build_modules, destination):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So this function both tests if the file is already shipped and computes the if not? It feels a bit messy, but I don't know how to make it better.

Comment thread JSON.md
Comment thread JSON.md
"variables": {
"run_script_module:main.scripts": {
"value": [
"$(sys.inputdir)/services/cfbs/scripts/script1.sh",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So the file input paths end up in the augments? Should you be able to add files without having them modifying augments? E.g., by omitting variable, namespace, bundle?

@@ -0,0 +1,48 @@
set -e

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add a test here testing no extension constraints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants