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

latest directory in container git repositories? #4

Closed
praiskup opened this issue Apr 25, 2017 · 5 comments
Closed

latest directory in container git repositories? #4

praiskup opened this issue Apr 25, 2017 · 5 comments

Comments

@praiskup
Copy link
Contributor

praiskup commented Apr 25, 2017

It is really ugly that we loose the git history all the time with new versions of our containers, speaking in examples - consider PostgreSQL container:

  1. working with 9.2 directory, we iterated a lot (git blame and git history gives us useful info
  2. but then we needed to work on 9.4, so we copied and pasted whole 9.2 directory into 9.4, which means that the whole 9.4 directory lost all the useful commit history
  3. moving to 9.5 made this even worse, and upcoming 9.6 won't help obviously

Well, e.g. in Fedora dist-git, we have master branch which guarantees that all the necessary info for git blame persists. It is fair also to keep the "authorship" of contributions.

Perhaps we should have e.g. latest directory now (instead of 9.6) and make the 9.6 be a symbolic link to latest?

@praiskup praiskup changed the title master directory in container git repositories? latest directory in container git repositories? Apr 25, 2017
praiskup added a commit to praiskup/postgresql-container that referenced this issue Apr 25, 2017
Move '9.2' into 'latest' to keep the whole commit history.
praiskup added a commit to praiskup/postgresql-container that referenced this issue Apr 25, 2017
Copy 'latest' into '9.2'.  We sacrifice git history of 9.2 to have
better history in latest.
praiskup added a commit to praiskup/postgresql-container that referenced this issue Apr 25, 2017
Copy related changes from 9.5 into latest, and replace the whole
9.5 with symlink to latest.
@omron93
Copy link
Contributor

omron93 commented Apr 25, 2017

+1

To note, it seems to me that change only point 2. would work too for some git commands (eg. git blame).

  1. but then we needed to work on 9.4, so we rename whole 9.2 directory into 9.4 and commit this. Then copy 9.4 as 9.2 and add it. Push these two commits together.

But having latest directory seems more clean to me. Also
@bparees Are there any requirements for having directory for each version? I know that images should be able to build with docker build command.

In case we want to solve problem with multiple versions and would change the workflow - adding latest directory.
So why not to remove directories and have only one directory with dockerfiles: Dockerfile.9.2, Dockerfile.9.4, Dockerfile.9.5. Have only one scripts and in dockerfiles set some for example VERSION variable to allow differences in scripts.

@pkubatrh
Copy link
Member

+1 from me, having latest with the full git history would be really useful. I often find myself trying to find out what got changed where.

So why not to remove directories and have only one directory with dockerfiles: Dockerfile.9.2, Dockerfile.9.4, Dockerfile.9.5. Have only one scripts and in dockerfiles set some for example VERSION variable to allow differences in scripts.

This would work in case there are no major differences outside of Dockerfiles between the images (which I think is the case for most of the images right now). But not sure if that can be guaranteed (=we want to work around) in future.

@bparees
Copy link
Contributor

bparees commented Apr 25, 2017

@bparees Are there any requirements for having directory for each version?

there are no requirements, since you guys own the CI/CD infrastructure and getting the images built on OSBS, you're welcome to structure the directories in whatever way you see fit. As long as users can easily clone the repo and

  1. see/understand which files are for a given version
  2. build an image for a given version

it should be fine.

This would work in case there are no major differences outside of Dockerfiles between the images (which I think is the case for most of the images right now). But not sure if that can be guaranteed (=we want to work around) in future.

i think you're likely signing yourself up for a bit of pain here. How many versions of a given image does the SCL team imagine will be supported at a time? The small pain of maintaining 2-3 dockerfiles may be less than the pain of maintaining some scripting/tooling that produces those 2-3 dockerfiles w/ specialization. We've historically had cases where package names change or get added/removed, so you're going to have to deal w/ that if you are trying to generate multiple dockerfiles from a common definition.

@praiskup
Copy link
Contributor Author

praiskup commented May 3, 2017

Is this slowly moving to discussing sclorg/postgresql-container#139 ? That would be something where I would vote +1.

praiskup added a commit to praiskup/postgresql-container that referenced this issue Jul 27, 2017
Move '9.2' into 'latest' to keep the whole commit history.
praiskup added a commit to praiskup/postgresql-container that referenced this issue Jul 27, 2017
Copy 'latest' into '9.2'.  We sacrifice git history of 9.2 to have
better history in latest.
praiskup added a commit to praiskup/postgresql-container that referenced this issue Jul 27, 2017
Copy related changes from 9.5 into latest, and replace the whole 9.5 with
symlink to latest.
praiskup added a commit to praiskup/postgresql-container that referenced this issue Jul 27, 2017
Copy related changes from 9.5 into latest, and replace the whole 9.5 with
symlink to latest.
praiskup added a commit to praiskup/postgresql-container that referenced this issue Jul 27, 2017
Copy related changes from 9.5 into latest, and replace the whole 9.5 with
symlink to latest.
praiskup added a commit to praiskup/postgresql-container that referenced this issue Jul 27, 2017
Move '9.2' into 'latest' to keep the whole commit history.
praiskup added a commit to praiskup/postgresql-container that referenced this issue Jul 27, 2017
Copy 'latest' into '9.2'.  We sacrifice git history of 9.2 to have
better history in latest.
praiskup added a commit to praiskup/postgresql-container that referenced this issue Jul 27, 2017
Copy related changes from 9.5 into latest, and replace the whole 9.5 with
symlink to latest.
pkubatrh pushed a commit to sclorg/postgresql-container that referenced this issue Jul 31, 2017
Move '9.2' into 'latest' to keep the whole commit history.
pkubatrh pushed a commit to sclorg/postgresql-container that referenced this issue Jul 31, 2017
Copy 'latest' into '9.2'.  We sacrifice git history of 9.2 to have
better history in latest.
pkubatrh pushed a commit to sclorg/postgresql-container that referenced this issue Jul 31, 2017
Copy related changes from 9.5 into latest, and replace the whole 9.5 with
symlink to latest.
@phracek
Copy link
Member

phracek commented Jun 3, 2024

Closing this issue. We do not have capacity for implementing.

@phracek phracek closed this as completed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants