Skip to content

Conversation

@ppandit-sfdc
Copy link
Collaborator

No description provided.

README.md Outdated
```zsh
cd my_package
datacustomcode scan ./payload/entrypoint.py
datacustomcode zip --path ./payload
Copy link
Contributor

Choose a reason for hiding this comment

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

deploy already runs zip, doesn't it?

Copy link
Collaborator Author

@ppandit-sfdc ppandit-sfdc Dec 1, 2025

Choose a reason for hiding this comment

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

yes, it does. this line is optional.

update: addressed in eb51f58

if not dataspace_value or (
isinstance(dataspace_value, str) and dataspace_value.strip() == ""
):
logger.error(
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be a warn maybe?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yup! addressed in eb51f58

raise ValueError(
f"dataspace must be defined in {config_json_path}. "
f"Please add a 'dataspace' field to the config.json file."
)
Copy link
Contributor

Choose a reason for hiding this comment

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

The diff between missing, null, or empty string is subtle in my mind. It might be simpler to just default to "default" value for all of those cases, instead of raising an exception specifically if it's missing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

as per our internal follow-up discussion, I'm planning to go with throwing an error when dataspace is excluded by customer explicitly for now. I plan to modify this behavior in case there is feedback indicating some need to handle this differently.

},
},
)
def test_rejects_empty_dataspace(self):
Copy link
Contributor

@markdlv-sf markdlv-sf Dec 1, 2025

Choose a reason for hiding this comment

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

Nit: should this be test_overwrites_empty_dataspace?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed test names in eb51f58

},
},
)
def test_rejects_missing_dataspace(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

I got confused by this test name- looks like we're actually testing test_adds_missing_config_file or something like that.

This also makes me think: do we want a test to cover the missing dataspace case? Currently, the PR is a raising a ValueError, but I'm suggesting perhaps we simplify that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed test names in eb51f58

@ppandit-sfdc ppandit-sfdc merged commit a26f459 into main Dec 1, 2025
2 checks passed
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