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

switch to unified github context string: suse/cloud #3055

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jdsn
Copy link
Member

@jdsn jdsn commented Dec 21, 2018

The previous context string "suse/mkcloud" was specific
to mkcloud. So it would be misleading to let jobs testing
other deployment tools report a status using this context
string.

On the other hand adding new context strings and requiring
them as mandatory for a merge would mean that on most PRs
some checks will never be run, because not all PRs run with
all deployment tools.

So this new context string

  • must have a success status which is mandatory for a merge
  • will be used for the status of the default test (PR build)
    of this PR.
    Hint: this is the "standard" job, that is defined in the
    github-pr yaml in:
    https://github.com/SUSE-Cloud/automation/blob/master/scripts/github_pr/github_pr_cloud.yaml#L5
    The "standard" is not added as suffix to the context, while
    all other build names (keys on the same level in the yaml) are
    appended as suffix to the base context.
  • is the base string for all additional (optional and mandatory)
    contexts that are required (this is already the case).
    e.g.
    old: suse/mkcloud/stable
    new: suse/cloud/stable

The previous context string "suse/mkcloud" was specific
to mkcloud. So it would be misleading to let jobs testing
other deployment tools report a status using this context
string.

On the other hand adding new context strings and requiring
them as mandatory for a merge would mean that on most PRs
some checks will never be run, because not all PRs run with
all deployment tools

So this new context string
- must have a success status which is mandatory for a merge
- will be used for the status of the default test (PR build)
  of this PR.
  Hint: this is the "standard" job, that is defined in the
  github-pr yaml in:
  https://github.com/SUSE-Cloud/automation/blob/master/scripts/github_pr/github_pr_cloud.yaml#L5
  The "standard" is not added as suffix to the context, while
  all other build names (keys on the same level in the yaml) are
  appended as suffix to the base context.
- is the base string for all additional (optional and mandatory)
  contexts that are required (this is already the case).
  e.g.
    old: suse/mkcloud/stable
    new: suse/cloud/stable
@jdsn
Copy link
Member Author

jdsn commented Dec 21, 2018

Please note
This PR is a preparation for the switch of the context string during the planned downtime.
Do NOT merge it yet.

Copy link
Contributor

@aspiers aspiers left a comment

Choose a reason for hiding this comment

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

Kudos on the detailed commit message! I really appreciate the effort here. Nevertheless I still have some nitpicks, sorry ;-)

The previous context string "suse/mkcloud" was specific to mkcloud.

Here you are assuming that reviewers all know exactly what a context string is. Given this morning's discussion, I think this is not at all a safe assumption. Better to include a quick explanation which links to the relevant section in the API docs.

So it would be misleading to let jobs testing other
deployment tools report a status using this context string.

Worth citing Ardana / CLM here for clarity.

On the other hand adding new context strings

Does this imply "adding new context strings whilst keeping suse/mkcloud"? If so, better to be explicit.

and requiring them as mandatory for a merge would mean that on most PRs some checks will never be run, because not all PRs run with all deployment tools

This is a little hard for me to understand. If you are talking about PRs only on this automation repo, then it's worth explicitly stating that the problem is that it has to deal with separate PRs for Crowbar and Ardana, and so Crowbar checks should only be required on Crowbar-related PRs, and similarly for Ardana. I find that references to "some checks" and "all deployment tools" are a bit vague.

Also, what about PRs on other repos, such as the Crowbar ones? Are they out of scope for this PR?

So this new context string

  • must have a success status which is mandatory for a merge

I don't follow this - how can a context string have a success status? It's just a string.

  • will be used for the status of the default test (PR build)
    of this PR.

What is the default test? Where is that defined? When can the default be overridden, and when it is, how does that impact the context string?

Hint: this is the "standard" job, that is defined in the
github-pr yaml in:
/scripts/github_pr/github_pr_cloud.yaml@master#L5
The "standard" is not added as suffix to the context, while
all other build names (keys on the same level in the yaml) are
appended as suffix to the base context.

Why this special case, instead of always having a suffix?

  • is the base string for all additional (optional and mandatory)
    contexts that are required (this is already the case).

Optional contexts that are required? Isn't that a contradiction, or am I missing something?

e.g.
old: suse/mkcloud/stable
new: suse/cloud/stable

This example helps. More examples would help even more :-)

BTW I know this is a lot of questions. Based on this morning's discussion I think I probably know answers to some of these, but I'm still not 100% sure and anyway the commit message is for the benefit of the whole team, not just me :-)

@@ -84,23 +84,24 @@
github_pr_sha=${github_opts[1]}
github_pr_branch=${github_opts[2]}
ghpr_paras="--org ${crowbar_org} --repo ${crowbar_repo} --sha ${github_pr_sha}"
gh_context="suse/cloud"
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be gh_context_prefix? It's not the whole context.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I agree, gh_context_prefix is a more meaningful name for the variable.

github_context=suse/mkcloud
if [[ $github_pr_context ]] ; then
github_context=$github_context/$github_pr_context
github_context=suse/cloud
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here - github_context_prefix?

github_context=$github_context/$github_pr_context
github_context=suse/cloud
if [[ $github_pr_context_suffix ]] ; then
github_context=$github_context/$github_pr_context_suffix
Copy link
Contributor

Choose a reason for hiding this comment

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

github_context=$github_context_prefix/$github_pr_context_suffix

@dirkmueller
Copy link
Contributor

have we considered changing this to suse/cloud/mkcloud/stable instead of suse/cloud/stable ? stable is a very generic term and it was much more specific before.

@jdsn
Copy link
Member Author

jdsn commented Jan 6, 2019

@dirkmueller

have we considered changing this to suse/cloud/mkcloud/stable instead of suse/cloud/stable ?

No. The agreement was to switch to suse/cloud as base context (context string for the default CI job). All additional jobs will append their suffix to this. So, an "ha" build will report to: suse/cloud/ha.
And the stable build (which is the build against the currently 'stable' product) will report to suse/cloud/stable.

stable is a very generic term and it was much more specific before.

We already have the stable suffix for the stable builds as described. This will not change. We can do the change, sure. But please only lets have one big change.

I just wanted to do the switch this night. In case you prefer to add other changes, I am open to postpone this action by a week or two (maybe this is a topic for a breakout session in two weeks?).

@dirkmueller
Copy link
Contributor

dirkmueller commented Jan 7, 2019

@dirkmueller

have we considered changing this to suse/cloud/mkcloud/stable instead of suse/cloud/stable ?

No. The agreement was to switch to suse/cloud as base context (context string for the default CI job).

I'm not disagreeing with the change of the base context (context prefix). with that change the specific that this is a "mkcloud" job is lost however, thats why I asked whether we want to add mkcloud/ as a prefix to the suffix (hah, good luck with parsing that !)

e.g.

-context_prefix=suse/mkcloud
+context_prefix=suse/cloud
-context_suffix=stable
+context_suffix=mkcloud/stable

(this is pseudo code)

@aspiers
Copy link
Contributor

aspiers commented Jan 7, 2019

I agree with Dirk. We should not lose the mkcloud substring, and his proposal seems like the obvious way to achieve that whilst still moving to a generic suse/cloud base context.

Copy link
Contributor

@ConsoleCatzirl ConsoleCatzirl left a comment

Choose a reason for hiding this comment

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

If we have one job that reports back with the base context prefix, and all other jobs report with a suffix appended, how do we ensure that the additional jobs are not treated as second-class citizens? For example, we have both openstack-mkcloud and openstack-ardana and we should be treating both equally. We want them both to be mandatory, and reporting a skipped test should look similar for both jobs.

Perhaps we should deprecate the base context for the time being, and give all jobs a context suffix. So we could have suse/cloud/mkcloud and suse/cloud/ardana both as mandatory, and reserve suse/cloud for when we have converged on a single lifecycle manager (or a single job that tests both manager paths).

@@ -84,23 +84,24 @@
github_pr_sha=${github_opts[1]}
github_pr_branch=${github_opts[2]}
ghpr_paras="--org ${crowbar_org} --repo ${crowbar_repo} --sha ${github_pr_sha}"
gh_context="suse/cloud"
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I agree, gh_context_prefix is a more meaningful name for the variable.

@aspiers
Copy link
Contributor

aspiers commented Jan 21, 2019

I agree with @jesusaurus's point about treating them equally. I think @dirkmueller's proposal should tick all the boxes and keep everyone happy?

@ConsoleCatzirl
Copy link
Contributor

@aspiers yeah, I think we're all happy with @dirkmueller's proposal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants