Skip to content

Add docker_image mirroring #238

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add docker_image mirroring #238

wants to merge 3 commits into from

Conversation

Horstage
Copy link

No description provided.

@@ -68,7 +68,7 @@ def git(*cmd: str) -> None:
# Commit and tag
git('add', '.')
git('commit', '-m', f'Mirror: {version}')
git('tag', f'v{version}')
git('tag', f'v{version}' if language != 'docker_image' else version)
Copy link
Author

Choose a reason for hiding this comment

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

This may be a controversial decision, but I want to keep the git tags in sync with the docker tags.

Copy link
Author

Choose a reason for hiding this comment

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

This files overwrites the all/.pre-commit-hooks.yaml. It think that's nice and intuitive, but depends on this line to stay in that order.

Comment on lines +261 to +268
def test_docker_image_integration_official_repo(in_git_dir):
make_repo(
'.',
language='docker_image', name='python', description='',
entry='python', id='python-docker', match_key='files',
match_val=r'\.py$', args='[]', require_serial='false',
minimum_pre_commit_version='0',
)
Copy link
Author

Choose a reason for hiding this comment

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

Not really a valid pre-commit hook, but there are so few in the official repo 🤷
Also this is a good, but time consuming test for the pagination requests.

@asottile
Copy link
Member

before you spend more time on this I think there needs to be a little more discussion:

  • overwriting the pre-commit config specifically for docker seems like a bad choice
  • deviating from the tag format also not good
  • I don't think this is necessary at all, docker_image is really only intended to be used in places like repo: local
  • limiting this to dockerhub also isn't great not to mention the heavily limited api

@Horstage
Copy link
Author

  1. Yes, there is the problem of synchronising these files when changes need to be made. However, this was the least intrusive way to add the version tag to the entry.
  2. Tags don't have to be numbered versions. I'm okay with beeing backwards compatible but having to write vlatest is even dumber than the latest tag in general
  3. My goal was to use the latest version of prettier, as your official mirror is archived. I'm sure there is a good reason and that's why I didn't investigate further in the direction of JS. By the way, providing the reason would be helpful for me and others with the same problem.
  4. True, I'm open to suggestions. I tried to implement it without making too many changes to the interface.

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.

2 participants