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

bundle: DRYer root.path entry #840

Merged
merged 1 commit into from
Jun 21, 2017

Conversation

wking
Copy link
Contributor

@wking wking commented May 18, 2017

Instead of repeating the config.md conditions, just make the linkage more clear. Now the chain is:

  1. Bundles REQUIRE a config.json which is a bundle artifact.
  2. If that config.json has a root.path entry (as specified in config.md), then add the referenced directory to the set of bundle artifacts. The config.md requirements include “If defined, a directory MUST exist at the path declared by the field”.
  3. Apply the “MUST all be present in a single directory” condition to all bundle artifacts. I don't like that direct-child restriction, but I'm not touching it in this commit.

So these are the same requirements as before this commit, but with less redundancy and fewer words.

@wking wking force-pushed the dry-bundle-hyper-v branch from 6cedef2 to 22836ee Compare May 22, 2017 17:24
@wking
Copy link
Contributor Author

wking commented May 22, 2017

Rebased around #839 with 6cedef222836ee.

@crosbymichael
Copy link
Member

Please rebase

@mrunalp mrunalp added this to the 1.0.0 milestone Jun 1, 2017
@wking wking force-pushed the dry-bundle-hyper-v branch from 22836ee to b420c96 Compare June 1, 2017 18:08
@wking
Copy link
Contributor Author

wking commented Jun 1, 2017

Please rebase

Rebased around #846 with 22836eeb420c96.

The Travis error looks like a network hiccup. If you want that green you can probably just kick the build again.

bundle.md Outdated
On all other platforms, this field is REQUIRED.

If set, this directory MUST be referenced by [`root`](config.md#root) within the `config.json` file.
2. <a name="containerFormat02" />The directory referenced by [`root.path`](config.md#root), if that property is set in `config.json`.

Choose a reason for hiding this comment

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

A directory referenced by ... will be better?

Copy link
Contributor Author

@wking wking Jun 16, 2017

Choose a reason for hiding this comment

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

A directory referenced by ... will be better?

There is only one directory referenced by a given root.path value, so I prefer the definite article. But if you can get a second opinion in favor of the indefinite "A", I'll change it.

Choose a reason for hiding this comment

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

I think there is doubt, directory is the subject of this sentence. Here, we want to express there is a directory which is referenced by config.md#root. The directory will stress that directory is a specific directory, that's OK, but the base is everyone know which and what the directory is. I think there is not such base in context, it looks unreasonable.
If I'm wrong, please feel free to correct me.

Copy link
Contributor Author

@wking wking Jun 16, 2017

Choose a reason for hiding this comment

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

Here, we want to express there is a directory which is referenced by config.md#root.

Yes, and it is that directory which is the artifact.

The directory will stress that directory is a specific directory, that's OK, but the base is everyone know which and what the directory is. I think there is not such base in context, it looks unreasonable.

But everyone should know which directory it is, since we say "referenced by root.path, if that property is set in config.json". So the previous entry establishes the config.jsonartifact, and there can be only one file at that path. And this entry establishes (when root.path is set in that configuration) the referenced directory as an artifact too. Once you have the config.json, there is no further choice about which directory you use for this artifact.

Choose a reason for hiding this comment

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

OK, How about as following:
2. container's root filesystem: the directory referenced by root.path, if that property is set in config.json.

keep same format with previous entry, just a suggestion.

Copy link
Contributor Author

@wking wking Jun 16, 2017

Choose a reason for hiding this comment

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

keep same format with previous entry...

Sure. I can push that up tomorrow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

keep same format with previous entry...

Sure. I can push that up tomorrow.

I've pushed your suggested wording with b420c96dbfae14.

@wking wking force-pushed the dry-bundle-hyper-v branch from b420c96 to dbfae14 Compare June 16, 2017 16:58
Instead of repeating the config.md conditions, just make the linkage
more clear.  Now the chain is:

1. Bundles REQUIRE a config.json which is a bundle artifact.
2. If that config.json has a root.path entry (as specified in
   config.md), then add the referenced directory to the set of bundle
   artifacts.  The config.md requirements include "If defined, a
   directory MUST exist at the path declared by the field".
3. Apply the "MUST all be present in a single directory" condition to
   all bundle artifacts.  I don't like that direct-child restriction
   [1], but I'm not touching it in this commit.

So these are the same requirements as before this commit, but with
less redundancy and fewer words.

[1]: opencontainers#469

Signed-off-by: W. Trevor King <[email protected]>
@tianon
Copy link
Member

tianon commented Jun 21, 2017

LGTM

Approved with PullApprove

1 similar comment
@dqminh
Copy link
Contributor

dqminh commented Jun 21, 2017

LGTM

Approved with PullApprove

@dqminh dqminh merged commit 92e028a into opencontainers:master Jun 21, 2017
@wking wking deleted the dry-bundle-hyper-v branch June 21, 2017 17:04
@vbatts vbatts mentioned this pull request Jul 5, 2017
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.

6 participants