Skip to content

pkg/utils: Separate container & image name resolution - #838

Merged
debarshiray merged 1 commit into
containers:mainfrom
debarshiray:wip/rishi/split-resolve-container-image
Jul 13, 2021
Merged

debarshiray merged 1 commit into
containers:mainfrom
debarshiray:wip/rishi/split-resolve-container-image

Conversation

@debarshiray

Copy link
Copy Markdown
Member

The ResolveContainerAndImageNames() function does too much work. It
makes more sense to have two functions: one for resolving the image
name and another for resolving the container name.

#828

debarshiray pushed a commit to debarshiray/toolbox that referenced this pull request Jul 13, 2021
The ResolveContainerAndImageNames() function does too much work. It
makes more sense to have two functions: one for resolving the image
name and another for resolving the container name.

containers#828
containers#838
@debarshiray
debarshiray force-pushed the wip/rishi/split-resolve-container-image branch from 19a262f to 188908b Compare July 13, 2021 11:04
The ResolveContainerAndImageNames() function does too much work. It
makes more sense to have two functions: one for resolving the image
name and another for resolving the container name.

containers#828
containers#838
@debarshiray
debarshiray force-pushed the wip/rishi/split-resolve-container-image branch from 188908b to fd75608 Compare July 13, 2021 11:07
@softwarefactory-delete-me

Copy link
Copy Markdown

Build succeeded.

@debarshiray
debarshiray merged commit fd75608 into containers:main Jul 13, 2021
@debarshiray
debarshiray deleted the wip/rishi/split-resolve-container-image branch July 13, 2021 11:27
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jul 31, 2022
The idea of splitting ResolveContainerAndImageNames into two public
functions [1] didn't turn out to be so useful [2].  Splitting things
even further might make it worse.  A better approach might be to
(re-)unify the code further.

This is the first step towards that.

This reverts the following commits:
  * 5c8ad7a
  * 02f45fd
  * 8b6418d

... but retains the test cases that were not tied to the changes in
those commits.

[1] Commit fd75608
    containers#828
    containers#838

[2] containers#977

containers#937
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jul 31, 2022
The idea of splitting ResolveContainerAndImageNames into two public
functions [1] didn't turn out to be so useful [2].  It pushed the
burden on the callers, who needed to carefully call the split
functions in the right order, because the container, distro, image and
release values are very tightly related.  This opens the door for
mistakes.

A better approach would be to restore ResolveContainerAndImageNames as
the single public API.  If necessary it could be internally split into
smaller private functions.  It would keep things simple for the
callers.

Note that this commit doesn't include the private split.  If necessary,
it can be done in future.

This reverts commit fd75608.

[1] Commit fd75608
    containers#828
    containers#838

[2] containers#977

containers#937
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Aug 1, 2022
The idea of splitting ResolveContainerAndImageNames into two public
functions [1] didn't turn out to be so useful [2].  Splitting things
even further might make it worse.  A better approach might be to
(re-)unify the code further.

This is the first step towards that.

This reverts the following commits:
  * 5c8ad7a
  * 02f45fd
  * 8b6418d

... but retains the test cases that were not tied to the changes in
those commits.

[1] Commit fd75608
    containers#828
    containers#838

[2] containers#977

containers#937
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Aug 1, 2022
The idea of splitting ResolveContainerAndImageNames into two public
functions [1] didn't turn out to be so useful [2].  It pushed the
burden on the callers, who needed to carefully call the split
functions in the right order, because the container, distro, image and
release values are very tightly related.  This opens the door for
mistakes.

A better approach would be to restore ResolveContainerAndImageNames as
the single public API.  If necessary it could be internally split into
smaller private functions.  It would keep things simple for the
callers.

Note that this commit doesn't include the private split.  If necessary,
it can be done in future.

This reverts commit fd75608.

[1] Commit fd75608
    containers#828
    containers#838

[2] containers#977

containers#937
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Aug 31, 2022
The idea of splitting ResolveContainerAndImageNames into two public
functions [1] didn't turn out to be so useful [2].  Splitting things
even further might make it worse.  A better approach might be to
(re-)unify the code further.

This is the first step towards that.

This reverts the following commits:
  * 5c8ad7a
  * 02f45fd
  * 8b6418d

... but retains the test cases that were not tied to the changes in
those commits.

[1] Commit fd75608
    containers#828
    containers#838

[2] containers#977

containers#937
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Aug 31, 2022
The idea of splitting ResolveContainerAndImageNames into two public
functions [1] didn't turn out to be so useful [2].  It pushed the
burden on the callers, who needed to carefully call the split
functions in the right order, because the container, distro, image and
release values are very tightly related.  This opens the door for
mistakes.

A better approach would be to restore ResolveContainerAndImageNames as
the single public API.  If necessary it could be internally split into
smaller private functions.  It would keep things simple for the
callers.

Note that this commit doesn't include the private split.  If necessary,
it can be done in future.

This reverts commit fd75608.

[1] Commit fd75608
    containers#828
    containers#838

[2] containers#977

containers#937
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Aug 31, 2022
The idea of splitting ResolveContainerAndImageNames into two public
functions [1] didn't turn out to be so useful [2].  Splitting things
even further might make it worse.  A better approach might be to
(re-)unify the code further.

This is the first step towards that.

This reverts the following commits:
  * 5c8ad7a
  * 02f45fd
  * 8b6418d

... but retains the test cases that were not tied to the changes in
those commits.

[1] Commit fd75608
    containers#828
    containers#838

[2] containers#977

containers#937
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Aug 31, 2022
The idea of splitting ResolveContainerAndImageNames into two public
functions [1] didn't turn out to be so useful [2].  It pushed the
burden on the callers, who needed to carefully call the split
functions in the right order, because the container, distro, image and
release values are very tightly related.  This opens the door for
mistakes.

A better approach would be to restore ResolveContainerAndImageNames as
the single public API.  If necessary it could be internally split into
smaller private functions.  It would keep things simple for the
callers.

Note that this commit doesn't include the private split.  If necessary,
it can be done in future.

This reverts commit fd75608.

[1] Commit fd75608
    containers#828
    containers#838

[2] containers#977

containers#937
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Sep 1, 2022
The idea of splitting ResolveContainerAndImageNames into two public
functions [1] didn't turn out to be so useful [2].  Splitting things
even further might make it worse.  A better approach might be to
(re-)unify the code further.

This is the first step towards that.

This reverts the following commits:
  * 5c8ad7a
  * 02f45fd
  * 8b6418d

... but retains the test cases that were not tied to the changes in
those commits.

[1] Commit fd75608
    containers#828
    containers#838

[2] containers#977

containers#937
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Sep 1, 2022
The idea of splitting ResolveContainerAndImageNames into two public
functions [1] didn't turn out to be so useful [2].  It pushed the
burden on the callers, who needed to carefully call the split
functions in the right order, because the container, distro, image and
release values are very tightly related.  This opens the door for
mistakes.

A better approach would be to restore ResolveContainerAndImageNames as
the single public API.  If necessary it could be internally split into
smaller private functions.  It would keep things simple for the
callers.

Note that this commit doesn't include the private split.  If necessary,
it can be done in future.

This reverts commit fd75608.

[1] Commit fd75608
    containers#828
    containers#838

[2] containers#977

containers#937
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Sep 1, 2022
The idea of splitting ResolveContainerAndImageNames into two public
functions [1] didn't turn out to be so useful [2].  Splitting things
even further might make it worse.  A better approach might be to
(re-)unify the code further.

This is the first step towards that.

This reverts the following commits:
  * 5c8ad7a
  * 02f45fd
  * 8b6418d

... but retains the test cases that were not tied to the changes in
those commits.

[1] Commit fd75608
    containers#828
    containers#838

[2] containers#977

containers#937
containers#1080
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Sep 1, 2022
The idea of splitting ResolveContainerAndImageNames into two public
functions [1] didn't turn out to be so useful [2].  It pushed the
burden on the callers, who needed to carefully call the split
functions in the right order, because the container, distro, image and
release values are very tightly related.  This opens the door for
mistakes.

A better approach would be to restore ResolveContainerAndImageNames as
the single public API.  If necessary it could be internally split into
smaller private functions.  It would keep things simple for the
callers.

Note that this commit doesn't include the private split.  If necessary,
it can be done in future.

This reverts commit fd75608.

[1] Commit fd75608
    containers#828
    containers#838

[2] containers#977

containers#937
containers#1080
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.

2 participants