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: label key should get saved without value if saved without propagation #3190

Merged
merged 4 commits into from
Mar 30, 2023

Conversation

manish-agrawal-ai
Copy link
Contributor

@manish-agrawal-ai manish-agrawal-ai commented Mar 27, 2023

Description

  1. non-propagated labels should get saved even if value if not provided while creating/updating application.
  2. Key length increased in DB for global tag

Fixes #3191

How Has This Been Tested?

  • IT

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

Does this PR introduce a user-facing change?


@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@manish-agrawal-ai manish-agrawal-ai merged commit ba9d38e into main Mar 30, 2023
@manish-agrawal-ai manish-agrawal-ai deleted the fix_global_tag branch March 30, 2023 07:24
@manish-agrawal-ai manish-agrawal-ai changed the title fix: label key can be saved without value if saved without propagation fix: label key should get saved without value if saved without propagation Mar 30, 2023
gireesh-naidu pushed a commit that referenced this pull request Jun 16, 2023
* handled nil pointer in imagePullSecret service when asserting k8s error type (#3208)

* fix: rbac optimisation for creation of policies for devtron app, helm app and cluster (#2948)

* change1

* "RBAC Refactoring and Policy Creation Optimisation"

* "Removing ClusterType"

* "ReFactoring the changes"

* removed redundant method

* "Changes After Reviews"

* "Changes After Reviews 2"

* "Changes After Reviews 3"

* "Changes After Reviews 4"

* "Changes After Reviews 5"

* "Changes After Reviews 6"

* "Changes After Reviews 6"

* "Changes based on entity"

* Code Cleaning

* Code change 8

* Code change 9

* Code change 9

* Code change 10

* Code change 11

* Code change 12

* Code change 13

* fixed transaction error for creating roles

* refactoring - 1

* refactoring

* Changes after Resolving conflicts

* Changes after Resolving conflicts 2

* Changes after Resolving conflicts 3

* Changes after Resolving access_type to accessType and queries

* Final changes

* Rbac-Optimimisation Change

* Rbac-Optimimisation Final Change

* refactoring

* Fixing Legacy Bug

* Fixing Visiblity issues all pods

* Merge with main

* Intialisation with capacity and adding logs

* Intialisation with capacity and adding logs

* Refactoring the changes

* Adding logs

* Adding logs 1

* Updating the audit logs for create Role

* Handling from code instead of script

* Merge Main

* Deleting Commented Code and adding role group view

* Fixing issues caught in Dev-Testing

* Removing script queries

* Fixing Issues of entity empty

* Dev-Testing Changes

* Final Changes

* Reducing duplication

* Reducing duplication

* Adding audit logs for superAdmin for user role mappings

* Visibility of permissions

* Visibility of permissions for devtron-apps

* Fixing Legacy issue for deleting roleGroup permissions

* deleting group and role mapping from casbin

* updated sql script no.

---------

Co-authored-by: kartik-579 <kartik@devtron.ai>

* fix: user/role group sql lock fix (#3206)

* change1

* "RBAC Refactoring and Policy Creation Optimisation"

* "Removing ClusterType"

* "ReFactoring the changes"

* removed redundant method

* "Changes After Reviews"

* "Changes After Reviews 2"

* "Changes After Reviews 3"

* "Changes After Reviews 4"

* "Changes After Reviews 5"

* "Changes After Reviews 6"

* "Changes After Reviews 6"

* "Changes based on entity"

* Code Cleaning

* Code change 8

* Code change 9

* Code change 9

* Code change 10

* Code change 11

* Code change 12

* Code change 13

* fixed transaction error for creating roles

* refactoring - 1

* refactoring

* Changes after Resolving conflicts

* Changes after Resolving conflicts 2

* Changes after Resolving conflicts 3

* Changes after Resolving access_type to accessType and queries

* Final changes

* Rbac-Optimimisation Change

* Rbac-Optimimisation Final Change

* refactoring

* Fixing Legacy Bug

* Fixing Visiblity issues all pods

* Merge with main

* Intialisation with capacity and adding logs

* Intialisation with capacity and adding logs

* Refactoring the changes

* Adding logs

* Adding logs 1

* Updating the audit logs for create Role

* Handling from code instead of script

* Merge Main

* Deleting Commented Code and adding role group view

* Fixing issues caught in Dev-Testing

* Removing script queries

* Fixing Issues of entity empty

* Dev-Testing Changes

* Final Changes

* Reducing duplication

* Reducing duplication

* Adding audit logs for superAdmin for user role mappings

* Visibility of permissions

* Visibility of permissions for devtron-apps

* Fixing Legacy issue for deleting roleGroup permissions

* deleting group and role mapping from casbin

* fix deadlock condition for user/role group update

* updated sql script no.

---------

Co-authored-by: shivam-nagar23 <shivam@devtron.ai>

* fix: label key can be saved without value if saved without propagation (#3190)

* fix: length of key increased in global tag

* fix: not validating label value required tag as tags can be supplied without value if saved without propagation

* sql file renamed

* deleted sql scripts

---------

Co-authored-by: Shivam-nagar23 <124123645+Shivam-nagar23@users.noreply.github.com>
Co-authored-by: shivam-nagar23 <shivam@devtron.ai>
Co-authored-by: Manish Agrawal <85211469+manish-agrawal-ai@users.noreply.github.com>
gireesh-naidu pushed a commit that referenced this pull request Jun 16, 2023
* handled nil pointer in imagePullSecret service when asserting k8s error type (#3208)

* fix: rbac optimisation for creation of policies for devtron app, helm app and cluster (#2948)

* change1

* "RBAC Refactoring and Policy Creation Optimisation"

* "Removing ClusterType"

* "ReFactoring the changes"

* removed redundant method

* "Changes After Reviews"

* "Changes After Reviews 2"

* "Changes After Reviews 3"

* "Changes After Reviews 4"

* "Changes After Reviews 5"

* "Changes After Reviews 6"

* "Changes After Reviews 6"

* "Changes based on entity"

* Code Cleaning

* Code change 8

* Code change 9

* Code change 9

* Code change 10

* Code change 11

* Code change 12

* Code change 13

* fixed transaction error for creating roles

* refactoring - 1

* refactoring

* Changes after Resolving conflicts

* Changes after Resolving conflicts 2

* Changes after Resolving conflicts 3

* Changes after Resolving access_type to accessType and queries

* Final changes

* Rbac-Optimimisation Change

* Rbac-Optimimisation Final Change

* refactoring

* Fixing Legacy Bug

* Fixing Visiblity issues all pods

* Merge with main

* Intialisation with capacity and adding logs

* Intialisation with capacity and adding logs

* Refactoring the changes

* Adding logs

* Adding logs 1

* Updating the audit logs for create Role

* Handling from code instead of script

* Merge Main

* Deleting Commented Code and adding role group view

* Fixing issues caught in Dev-Testing

* Removing script queries

* Fixing Issues of entity empty

* Dev-Testing Changes

* Final Changes

* Reducing duplication

* Reducing duplication

* Adding audit logs for superAdmin for user role mappings

* Visibility of permissions

* Visibility of permissions for devtron-apps

* Fixing Legacy issue for deleting roleGroup permissions

* deleting group and role mapping from casbin

* updated sql script no.

---------

Co-authored-by: kartik-579 <kartik@devtron.ai>

* fix: user/role group sql lock fix (#3206)

* change1

* "RBAC Refactoring and Policy Creation Optimisation"

* "Removing ClusterType"

* "ReFactoring the changes"

* removed redundant method

* "Changes After Reviews"

* "Changes After Reviews 2"

* "Changes After Reviews 3"

* "Changes After Reviews 4"

* "Changes After Reviews 5"

* "Changes After Reviews 6"

* "Changes After Reviews 6"

* "Changes based on entity"

* Code Cleaning

* Code change 8

* Code change 9

* Code change 9

* Code change 10

* Code change 11

* Code change 12

* Code change 13

* fixed transaction error for creating roles

* refactoring - 1

* refactoring

* Changes after Resolving conflicts

* Changes after Resolving conflicts 2

* Changes after Resolving conflicts 3

* Changes after Resolving access_type to accessType and queries

* Final changes

* Rbac-Optimimisation Change

* Rbac-Optimimisation Final Change

* refactoring

* Fixing Legacy Bug

* Fixing Visiblity issues all pods

* Merge with main

* Intialisation with capacity and adding logs

* Intialisation with capacity and adding logs

* Refactoring the changes

* Adding logs

* Adding logs 1

* Updating the audit logs for create Role

* Handling from code instead of script

* Merge Main

* Deleting Commented Code and adding role group view

* Fixing issues caught in Dev-Testing

* Removing script queries

* Fixing Issues of entity empty

* Dev-Testing Changes

* Final Changes

* Reducing duplication

* Reducing duplication

* Adding audit logs for superAdmin for user role mappings

* Visibility of permissions

* Visibility of permissions for devtron-apps

* Fixing Legacy issue for deleting roleGroup permissions

* deleting group and role mapping from casbin

* fix deadlock condition for user/role group update

* updated sql script no.

---------

Co-authored-by: shivam-nagar23 <shivam@devtron.ai>

* fix: label key can be saved without value if saved without propagation (#3190)

* fix: length of key increased in global tag

* fix: not validating label value required tag as tags can be supplied without value if saved without propagation

* sql file renamed

* Fix: App grouping optimisation on ci pipelines (#3219)

* optimize ci pipeline grouping

* fix

* fix

* optimized ci pipelines fetch for app grouping - removed scripts and parent app id

* added observability for ci pipeline in app grouping

* fixed query for getting workflow runner by appId and envId, re-added ci trigger metrics (#3222)

* removed sql files

---------

Co-authored-by: Shivam-nagar23 <124123645+Shivam-nagar23@users.noreply.github.com>
Co-authored-by: shivam-nagar23 <shivam@devtron.ai>
Co-authored-by: Manish Agrawal <85211469+manish-agrawal-ai@users.noreply.github.com>
Co-authored-by: Vikram <73224103+vikramdevtron@users.noreply.github.com>
gireesh-naidu pushed a commit that referenced this pull request Jun 16, 2023
* handled nil pointer in imagePullSecret service when asserting k8s error type (#3208)

* fix: rbac optimisation for creation of policies for devtron app, helm app and cluster (#2948)

* change1

* "RBAC Refactoring and Policy Creation Optimisation"

* "Removing ClusterType"

* "ReFactoring the changes"

* removed redundant method

* "Changes After Reviews"

* "Changes After Reviews 2"

* "Changes After Reviews 3"

* "Changes After Reviews 4"

* "Changes After Reviews 5"

* "Changes After Reviews 6"

* "Changes After Reviews 6"

* "Changes based on entity"

* Code Cleaning

* Code change 8

* Code change 9

* Code change 9

* Code change 10

* Code change 11

* Code change 12

* Code change 13

* fixed transaction error for creating roles

* refactoring - 1

* refactoring

* Changes after Resolving conflicts

* Changes after Resolving conflicts 2

* Changes after Resolving conflicts 3

* Changes after Resolving access_type to accessType and queries

* Final changes

* Rbac-Optimimisation Change

* Rbac-Optimimisation Final Change

* refactoring

* Fixing Legacy Bug

* Fixing Visiblity issues all pods

* Merge with main

* Intialisation with capacity and adding logs

* Intialisation with capacity and adding logs

* Refactoring the changes

* Adding logs

* Adding logs 1

* Updating the audit logs for create Role

* Handling from code instead of script

* Merge Main

* Deleting Commented Code and adding role group view

* Fixing issues caught in Dev-Testing

* Removing script queries

* Fixing Issues of entity empty

* Dev-Testing Changes

* Final Changes

* Reducing duplication

* Reducing duplication

* Adding audit logs for superAdmin for user role mappings

* Visibility of permissions

* Visibility of permissions for devtron-apps

* Fixing Legacy issue for deleting roleGroup permissions

* deleting group and role mapping from casbin

* updated sql script no.

---------

Co-authored-by: kartik-579 <kartik@devtron.ai>

* fix: user/role group sql lock fix (#3206)

* change1

* "RBAC Refactoring and Policy Creation Optimisation"

* "Removing ClusterType"

* "ReFactoring the changes"

* removed redundant method

* "Changes After Reviews"

* "Changes After Reviews 2"

* "Changes After Reviews 3"

* "Changes After Reviews 4"

* "Changes After Reviews 5"

* "Changes After Reviews 6"

* "Changes After Reviews 6"

* "Changes based on entity"

* Code Cleaning

* Code change 8

* Code change 9

* Code change 9

* Code change 10

* Code change 11

* Code change 12

* Code change 13

* fixed transaction error for creating roles

* refactoring - 1

* refactoring

* Changes after Resolving conflicts

* Changes after Resolving conflicts 2

* Changes after Resolving conflicts 3

* Changes after Resolving access_type to accessType and queries

* Final changes

* Rbac-Optimimisation Change

* Rbac-Optimimisation Final Change

* refactoring

* Fixing Legacy Bug

* Fixing Visiblity issues all pods

* Merge with main

* Intialisation with capacity and adding logs

* Intialisation with capacity and adding logs

* Refactoring the changes

* Adding logs

* Adding logs 1

* Updating the audit logs for create Role

* Handling from code instead of script

* Merge Main

* Deleting Commented Code and adding role group view

* Fixing issues caught in Dev-Testing

* Removing script queries

* Fixing Issues of entity empty

* Dev-Testing Changes

* Final Changes

* Reducing duplication

* Reducing duplication

* Adding audit logs for superAdmin for user role mappings

* Visibility of permissions

* Visibility of permissions for devtron-apps

* Fixing Legacy issue for deleting roleGroup permissions

* deleting group and role mapping from casbin

* fix deadlock condition for user/role group update

* updated sql script no.

---------

Co-authored-by: shivam-nagar23 <shivam@devtron.ai>

* fix: label key can be saved without value if saved without propagation (#3190)

* fix: length of key increased in global tag

* fix: not validating label value required tag as tags can be supplied without value if saved without propagation

* sql file renamed

* Fix: App grouping optimisation on ci pipelines (#3219)

* optimize ci pipeline grouping

* fix

* fix

* optimized ci pipelines fetch for app grouping - removed scripts and parent app id

* added observability for ci pipeline in app grouping

* fixed query for getting workflow runner by appId and envId, re-added ci trigger metrics (#3222)

* fix: updated rbac for devtron apps/helm pipeline (#3227)

* commented wrong rbac for devtron apps - helm pipeline

* updated comments:

* remove redundant files

---------

Co-authored-by: Shivam-nagar23 <124123645+Shivam-nagar23@users.noreply.github.com>
Co-authored-by: shivam-nagar23 <shivam@devtron.ai>
Co-authored-by: Manish Agrawal <85211469+manish-agrawal-ai@users.noreply.github.com>
Co-authored-by: Vikram <73224103+vikramdevtron@users.noreply.github.com>
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.

Bug: non-propagated labels should get saved without value
2 participants