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

Loosen uniqueness on job templates #4008

Closed
wenottingham opened this issue Jun 5, 2019 · 6 comments
Closed

Loosen uniqueness on job templates #4008

wenottingham opened this issue Jun 5, 2019 · 6 comments

Comments

@wenottingham
Copy link
Contributor

ISSUE TYPE
  • Feature Idea
SUMMARY
    '''
    A job template is a reusable job definition for applying a project (with
    playbook) to an inventory source with a given credential.
    '''
    FIELDS_TO_PRESERVE_AT_COPY = [
        'labels', 'instance_groups', 'credentials', 'survey_spec'
    ]
    FIELDS_TO_DISCARD_AT_COPY = ['vault_credential', 'credential']
    SOFT_UNIQUE_TOGETHER = [('polymorphic_ctype', 'name')]

Ideally, it would be unique across an org (or a project?)

@AlanCoding
Copy link
Member

Let's do this with the work item from #282, where the organization field will be added to the JT.

@wenottingham
Copy link
Contributor Author

Caveat: if relaxing this changes the named_url field, we may need a loud release note.

@wenottingham
Copy link
Contributor Author

Flipping back to needs_devel as #4338 was closed.

@ryanpetrello
Copy link
Contributor

@AlanCoding is there actually any tangible work here besides "merge #3903" ?

@AlanCoding
Copy link
Member

No other work AFAIK. Recap of status:

  • in JT.organization work, uniqueness is loosened from (name,) to (organization, name)
  • in that PR, named URL grows an additional JT-specific shim to support old URLs
  • even so, we would have to yell about it loudly in release notes

@kdelee
Copy link
Member

kdelee commented Mar 18, 2020

@tvo318 this is related to #3903

I have some notes there about how this is impacted

This has the consequence that the “named url” for the job template is now officially /api/v2/job_templates/MyJobTemplate++MyOrganization/ . However, for backwards compatibility the deprecated /api/v2/job_templates/MyJobTemplate will still work for Tower 3.7.

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