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

Add support for specific Docker tag in spawn_data_pipeline.py #553

Merged
merged 3 commits into from Jun 6, 2019

Conversation

Lothiraldan
Copy link
Contributor

Reverts #499

@Lothiraldan Lothiraldan requested a review from marco-c June 6, 2019 13:14
@Lothiraldan Lothiraldan marked this pull request as ready for review June 6, 2019 13:14
@Lothiraldan
Copy link
Contributor Author

I have fixed the spawn_data_pipeline.py by updating the Docker tag only for task which uses latest or no tag at all. This way we don't touch the bugbug docker tag.

@Lothiraldan
Copy link
Contributor Author

Example output with data-pipeline:

Don't update image mozilla/taskboot:0.1.3 for task docker-build as its already has a tag
Don't update image mozilla/taskboot:0.1.3 for task docker-push as its already has a tag
Don't update image mozilla/taskboot:0.1.3 for task http-deploy as its already has a tag

@marco-c
Copy link
Collaborator

marco-c commented Jun 6, 2019

Could we restrict the change of the tag to images starting with mozilla/bugbug?

Maybe we should go for the JSON-e solution in the future, so that things are more clearly defined and nothing unexpected can happen.

@marco-c
Copy link
Collaborator

marco-c commented Jun 6, 2019

Maybe we should go for the JSON-e solution in the future, so that things are more clearly defined and nothing unexpected can happen.

Let's file an issue about this so we don't forget.

@Lothiraldan
Copy link
Contributor Author

Could we restrict the change of the tag to images starting with mozilla/bugbug?

Yes we could, I will update this PR

Maybe we should go for the JSON-e solution in the future, so that things are more clearly defined and nothing unexpected can happen.

If I remember correctly we cannot as it is already a JSON-E template given to the hook definition

@marco-c
Copy link
Collaborator

marco-c commented Jun 6, 2019

If I remember correctly we cannot as it is already a JSON-E template given to the hook definition

Right :(

msg = (
"Don't update image {} for task {} as it already has a tag"
)
print(msg.format(base_image, task_internal_id))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: you could use a f-string here...


new_image = "{}:{}".format(tagless_image, docker_tag)
msg = "Updating image for task {} to {}"
print(msg.format(task_internal_id, new_image))
Copy link
Collaborator

Choose a reason for hiding this comment

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

...and here.

@marco-c marco-c merged commit 5a31c99 into master Jun 6, 2019
@marco-c marco-c deleted the revert-499-revert-489-spawn-pipeline-docker-tag branch June 27, 2019 08:46
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.

None yet

2 participants