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

Fix arosvc registry push #923

Merged
merged 2 commits into from
Aug 10, 2020
Merged

Conversation

mjudeikis
Copy link
Contributor

Fixes the ability to publish aro:master images into acrint

@asalkeld this one is for you urgent.
Currently logic in make file do now work because azure CI checksout commit id (not branch reference). See checkout step in ci[1]

git checkout --progress --force 500a5cc37f6c40030b6ef91cd574b0e106152681
Note: checking out '500a5cc37f6c40030b6ef91cd574b0e106152681'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
a state without impacting any branches by performing another checkout.

So because of this we never publish an image with latest tag.
I am removing BRANCH reference and using CI native way to set BRACH name. If can think a better way to do so, please push ontop or open your solution.

The second commit enables to run RP with latest image If I'm running RP from dirty copy (working in the code). Otherwise I get
aro:unknown if I'm running from non-committed code.

  1. https://msazure.visualstudio.com/AzureRedHatOpenShift/_build/results?buildId=33619065&view=logs&j=627439e9-18e7-568f-4f44-799be08ba1a7&t=85031616-8d4e-5788-e566-8f8c3abff8e1

@mjudeikis mjudeikis changed the title Fix arosvc push Fix arosvc registry push Aug 7, 2020
@mjudeikis mjudeikis added bug Something isn't working priority-high High priority issue or pull request labels Aug 7, 2020
Copy link
Contributor

@asalkeld asalkeld left a comment

Choose a reason for hiding this comment

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

Thanks for figuring this out

pkg/env/dev.go Outdated
if override != "" {
return override
}
if tag == "unknown" {
tag = "latest"
}

return fmt.Sprintf("%s.azurecr.io/aro:%s", d.acrName, version.GitCommit)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return fmt.Sprintf("%s.azurecr.io/aro:%s", d.acrName, version.GitCommit)
return fmt.Sprintf("%s.azurecr.io/aro:%s", d.acrName, tag)

saying that I am not convinced we need this, GitCommit is not used in the CI case..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is used in local run. If you are running from check-out replica it is trying to pull that commit image. But once you change any file in the repo but don't commit - it gets unknown.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, but that is as a developer and you should just be setting ARO_IMAGE=
can you remove this and let's merge the first chuck and chat about this after..
I had this earlier and Jim didn't like it and said that devs should just always set ARO_IMAGE

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If developers should always set it, let's add it default and people can override. We already have enough information for people to sink it. Because now behaviour is questionable. Previously - default settings - all works, now - not so much.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#925 to discuss

@asalkeld asalkeld merged commit 835acd3 into Azure:master Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-high High priority issue or pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants