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

Cookie updated by NetworkToCode Cookie Drift Manager Tool #287

Merged
merged 3 commits into from
Jan 9, 2025

Conversation

nautobot-bot
Copy link
Contributor

Template:

{
    "template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
    "dir": "nautobot-app",
    "ref": "refs/tags/nautobot-app-v2.4.1",
    "path": null
}

Cookie:

{
    "remote": "https://github.com/nautobot/nautobot-app-firewall-models.git",
    "path": "/tmp/tmp1r6mhcvu/nautobot-app-firewall-models",
    "repository_path": "/tmp/tmp1r6mhcvu/nautobot-app-firewall-models",
    "dir": "",
    "branch_prefix": "drift-manager",
    "context": {
        "codeowner_github_usernames": "@whitej6 @itdependsnetworks @jdrew82",
        "full_name": "Network to Code, LLC",
        "email": "[email protected]",
        "github_org": "nautobot",
        "app_name": "nautobot_firewall_models",
        "verbose_name": "Nautobot Firewall Models",
        "app_slug": "nautobot-firewall-models",
        "project_slug": "nautobot-app-firewall-models",
        "repo_url": "https://github.com/nautobot/nautobot-app-firewall-models",
        "base_url": "firewall-models",
        "min_nautobot_version": "2.0.0",
        "max_nautobot_version": "2.9999",
        "camel_name": "NautobotFirewallModels",
        "project_short_description": "Nautobot App to model firewall and security objects. Allows users to model policies in a vendor-neutral manner and use that data to drive network security automation",
        "model_class_name": "IPRange",
        "open_source_license": "Apache-2.0",
        "docs_base_url": "https://docs.nautobot.com",
        "docs_app_url": "https://docs.nautobot.com/projects/firewall-models/en/latest",
        "_template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
        "_output_dir": "/tmp/tmp1r6mhcvu",
        "_repo_dir": "/github/home/.cookiecutters/cookiecutter-nautobot-app/nautobot-app",
        "_checkout": "refs/tags/nautobot-app-v2.4.1"
    },
    "base_branch": "develop",
    "remote_name": "origin",
    "pull_request_strategy": "PullRequestStrategy.CREATE",
    "post_actions": [
        "PostAction.RUFF",
        "PostAction.POETRY"
    ],
    "baked_commit_ref": "40d9cefc5c5b9f7db4b1c9bdb3e6645a4dc4933c",
    "draft": false
}

CLI Arguments:

{
    "cookie_dir": "",
    "input": false,
    "json_filename": "",
    "output_dir": "",
    "push": true,
    "template": "",
    "template_dir": "",
    "template_ref": "refs/tags/nautobot-app-v2.4.1",
    "pull_request": null,
    "post_action": [
        "ruff",
        "poetry"
    ],
    "disable_post_actions": true,
    "draft": false
}

Template:

```
{
    "template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
    "dir": "nautobot-app",
    "ref": "refs/tags/nautobot-app-v2.4.1",
    "path": null
}
```

Cookie:

```
{
    "remote": "https://github.com/nautobot/nautobot-app-firewall-models.git",
    "path": "/tmp/tmp1r6mhcvu/nautobot-app-firewall-models",
    "repository_path": "/tmp/tmp1r6mhcvu/nautobot-app-firewall-models",
    "dir": "",
    "branch_prefix": "drift-manager",
    "context": {
        "codeowner_github_usernames": "@whitej6 @itdependsnetworks @jdrew82",
        "full_name": "Network to Code, LLC",
        "email": "[email protected]",
        "github_org": "nautobot",
        "app_name": "nautobot_firewall_models",
        "verbose_name": "Nautobot Firewall Models",
        "app_slug": "nautobot-firewall-models",
        "project_slug": "nautobot-app-firewall-models",
        "repo_url": "https://github.com/nautobot/nautobot-app-firewall-models",
        "base_url": "firewall-models",
        "min_nautobot_version": "2.0.0",
        "max_nautobot_version": "2.9999",
        "camel_name": "NautobotFirewallModels",
        "project_short_description": "Nautobot App to model firewall and security objects. Allows users to model policies in a vendor-neutral manner and use that data to drive network security automation",
        "model_class_name": "IPRange",
        "open_source_license": "Apache-2.0",
        "docs_base_url": "https://docs.nautobot.com",
        "docs_app_url": "https://docs.nautobot.com/projects/firewall-models/en/latest",
        "_template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
        "_output_dir": "/tmp/tmp1r6mhcvu",
        "_repo_dir": "/github/home/.cookiecutters/cookiecutter-nautobot-app/nautobot-app",
        "_checkout": "refs/tags/nautobot-app-v2.4.1"
    },
    "base_branch": "develop",
    "remote_name": "origin",
    "pull_request_strategy": "PullRequestStrategy.CREATE",
    "post_actions": [
        "PostAction.RUFF",
        "PostAction.POETRY"
    ],
    "baked_commit_ref": "40d9cefc5c5b9f7db4b1c9bdb3e6645a4dc4933c",
    "draft": false
}
```

CLI Arguments:

```
{
    "cookie_dir": "",
    "input": false,
    "json_filename": "",
    "output_dir": "",
    "push": true,
    "template": "",
    "template_dir": "",
    "template_ref": "refs/tags/nautobot-app-v2.4.1",
    "pull_request": null,
    "post_action": [
        "ruff",
        "poetry"
    ],
    "disable_post_actions": true,
    "draft": false
}
```
Copy link
Contributor

@jdrew82 jdrew82 left a comment

Choose a reason for hiding this comment

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

There appears to be a large amount of removing of code for some reason that's a bit concerning. Can we address that?

nautobot_firewall_models/api/serializers.py Show resolved Hide resolved
nautobot_firewall_models/api/serializers.py Show resolved Hide resolved
nautobot_firewall_models/api/urls.py Show resolved Hide resolved
@smk4664
Copy link
Contributor

smk4664 commented Jan 8, 2025

There appears to be a large amount of removing of code for some reason that's a bit concerning. Can we address that?

This is due to us adding the "model_class_name": "IPRange" to the cookiecutter.json file. Previously in pretty much all repo's this was set to None. So the Drift Manager is treating most of these files as new (since the without a model, they are deleted during the baking of a cookie). Once we resolve these changes, the future drift manager will ignore the code we add.

@smk4664 smk4664 requested a review from jdrew82 January 8, 2025 16:21
Copy link
Contributor

@jdrew82 jdrew82 left a comment

Choose a reason for hiding this comment

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

LGTM!

nautobot_firewall_models/api/serializers.py Show resolved Hide resolved
@jdrew82 jdrew82 merged commit c4f8c0c into develop Jan 9, 2025
14 checks passed
@jdrew82 jdrew82 deleted the drift-manager/pr branch January 9, 2025 00:34
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.

3 participants